Forum Discussion
DAX Change Filter Context
- 1 year ago
bi_analyst_2024
What I have understood from your provided information is, you're looking to override the slicer filter context so that for the P1 and P2 classification columns, you still show the customer's true classification in that period, even if it doesn't match the classification filter (e.g., Upper or Lower).P2 True Classification = CALCULATE ( MAX ( YourTable[P2 Classification] ), REMOVEFILTERS ( YourTable[P2 Classification] ) )This will get the P2 Classification for that row, but ignore any filters from the slicer that are filtering out the Lower classification.
REMOVEFILTERS() - Ensures the classification column isn't affected by slicers, allowing the "true" classification to be shown.
MAX() - Helps retrieve the relevant value for each row based on the current filter context.
*************************************************************************************************************************************************If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you,
Sarita
Linkedin
bi_analyst_2024
What I have understood from your provided information is, you're looking to override the slicer filter context so that for the P1 and P2 classification columns, you still show the customer's true classification in that period, even if it doesn't match the classification filter (e.g., Upper or Lower).
P2 True Classification =
CALCULATE (
MAX ( YourTable[P2 Classification] ),
REMOVEFILTERS ( YourTable[P2 Classification] )
)This will get the P2 Classification for that row, but ignore any filters from the slicer that are filtering out the Lower classification.
REMOVEFILTERS() - Ensures the classification column isn't affected by slicers, allowing the "true" classification to be shown.
MAX() - Helps retrieve the relevant value for each row based on the current filter context.
*************************************************************************************************************************************************
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you,
Sarita
Linkedin
- bi_analyst_20241 year agoFrequent Visitor
Hi - thank you for all the replies - the REMOVEFILTERS function is what I used to solve the problem - so you were correct. Thank you.