In Quicksight Q topic I am trying to add pecentOfTotal as a filter, But I am facing below ERROR. Please help me to resolve this
Please someone help me to resolve this issue
Hello @jayakumarim, I am wondering if we alter the calculation slightly maybe we can make this work. How are you wanting to apply the filter to the topic?
This error is interesting because it is a common error that will appear when calculated fields are added to a visual and one of the fields referenced are not in the visual.
Here is another option to write that calculation:
Percent of Total = distinctCountOver({Txn Id}, [{Txn Status Code}], PRE_AGG)/distinctCountOver({Txn Id}, [], PRE_AGG)
Then if it still won’t let you filter it the way you want, we can try to use the result of the field above to filter in an alternative way. Something like this:
ifelse(minOver({Percent of Total}, [{Txn Id}], PRE_AGG) >= 0.3, {Txn Id}, NULL)
Then you could try replacing your Txn Id field with this to only return the rows you are wanting to see. This is my initial idea on resolving this, so let me know if this helps!
Hi @WLS-DM ,
Thank you for the response,
I want to calculate two kinds of percentages
-
How much percentage of payments are processed over a scheduled in jan 2024
I expected the answer like
if processed payments are 40 (txn status code =6) and scheduled payments are 100 (shouldn’t consider txn status code). Then the percentage = 40*100/100 = 40.00% -
How many payments are returned over a processed in jan 2024
I expected the answer like
if processed payments are 40 (txn status code =6) and return payments are 20 (txn status code =9). Then the percentage = 20*100/40 = 50.00%
This is i am expecting
Please help me how to add filters to active this
Hi @WLS-DM ,
The above idea not working for me. Please help me with any other solution
Hello @jayakumarim, are you trying to filter the data that Quick Sight Q is referencing based on the percent calculation or are you wanting to reference the percent based on the time period and have it provide a return value?
Also, what didn’t work about the calculated fields that I suggested? What errors were you receiving?
Hello @jayakumarim, one thing you will want to do, is make sure it isn’t sum of payments percentage but rather min of payments percentage. Due to the nature of LAC-W calculations, those values will return the same percent value on multiple rows. In this case, if you are partition by Txn ID, then for every row containing that ID, it will return 0.33 or whatever the value is.
Instead, if you use min, it should return the actual value you are looking for. If you try that, I am curious if the number returned looks more accurate.
Hi @jayakumarim, did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the Quick Sight Community!

