Filter Context Manipulation: Removing Filters from a Measure
Hi PA team,
We would like to implement the following calculation:
We have a list of products, and we want to create a distinct count of these products.
However, for this measure, we would like the results to not be affected by the product color filter when used in a dashboard KPI or in a Discovery canvas.
In our data model, Product ID and Color are in the same table, and in Power BI there is an option to use REMOVEFILTERS inside CALCULATE to ignore specific filters for a measure.
Our question is:
How can we implement similar functionality in Pyramid Analytics?
We have checked the community resources but could not find an equivalent option.
Thanks in advance for your support.
2 replies
-
Hello ,
You can create a distinct count measure either in the semantic model or a custom measure.
Once you have the distinct count measure you can create a custom measure that ignores the color by applying all colors into a tuple with that measure:([measures].[distinct count measure], [tbl].[color].allmembers)This is means: run the aggregation "filtered" by all the colors and ignoring any other context of color filtering.
-
It works! Perfect, thank you