Hi,
I’m struggling to create filtered table with percentage over the whole column, not just the filtered one.
I have a calculated field “check” like "in(category, ${CategoryList}) ". Where CategoryList is parameter with multiple pre-defined values.
I have a table like this:

When I filter it check == 1 i get this:

What I’m trying to achieve is this:
.
Is there any way to do that?
Thank you!
1 Like
Hello @Valentin, how are you currently calculating that percent value? I think the best way to accomplish this would be to use LAC-W calculations to get the percent from the whole set of categories, even after filtering. It would look something like this:
percentage = sumOver({amount}, [{category], PRE_AGG)/sumOver({amount}, [], PRE_AGG)
That should return the values you are expecting while not changing depending on the filter being applied. I’ll mark this as the solution, but please let me know if you have any follow-up questions. Thank you!
Hello,
Thank you for your answer!
It worked with sumOver(amount, [{category}], PRE_AGG) / sumOver(amount, , PRE_FILTER)
1 Like