Forum Discussion
Help with Filters and Slicers
- 6 years ago
amitchandak , Kudos and thank you for your reply. I tried this version but it still caused the unwanted sum of the entire column regardless of the categories.
In working through this, however, I did realize that the filter I wanted to apply when a slicer value was selected would not flow back up the chain to the dimension table. Therefore, I was able to rectify this by bringing the grouped Categories into the Fact table instead. The resulting code I used simply referenced the category column in the fact table, thus filtering the results.
Try like
SWITCH(
TRUE(),
_max = "Category A", CALCULATE( DISTINCTCOUNT( 'Orders'[Order ID] ), 'Payor'[Payor Groups] in{ "X", "Y" } ),
_max = "Category B", CALCULATE( DISTINCTCOUNT( 'Orders'[Order ID] ), 'Payor'[Payor Groups] = "Z"),
DISTINCTCOUNT( 'Orders'[Order ID])
)- OrthoData6 years agoFrequent Visitor
amitchandak , Kudos and thank you for your reply. I tried this version but it still caused the unwanted sum of the entire column regardless of the categories.
In working through this, however, I did realize that the filter I wanted to apply when a slicer value was selected would not flow back up the chain to the dimension table. Therefore, I was able to rectify this by bringing the grouped Categories into the Fact table instead. The resulting code I used simply referenced the category column in the fact table, thus filtering the results.
- amitchandak6 years ago
Super User
If you can post the correct fomrula, that will help other users.