Forum Discussion

bi_analyst_2024's avatar
bi_analyst_2024
Frequent Visitor
1 year ago
Solved

DAX Change Filter Context

Hello   Customer P1 Classification P2 Classification Value P1 Value P2 Delta Customer1 Upper Upper 90,000 75,000 15,000 Customer2 Upper Upper 60,000 50,000 10,000 Custome...
  • saritasw's avatar
    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