Forum Discussion

leeleeds123's avatar
leeleeds123
Frequent Visitor
2 years ago
Solved

Linking My Measure to Multiple Slicers

Hi there,

 

I have a measure i am using in a visual:

 

Diff running total in Date =
CALCULATE(
    SUM('MASTER'[Diff]),
    FILTER(
        ALLSELECTED(Date_Table_Risk[Date]),
        ISONORAFTER('Date_Table_Risk'[Date], MAX('Date_Table_Risk'[Date]), DESC)
    )
)
 
This measures works fine in my visual, however when i use my slicer to filter by different teams for example i get the wrong results in my visual. I have been trying to incorporate allexcept into the measure with limited success.
 
For ref the table i am trying to link it to is called 'Master' and the column is called 'Risk Owner'.
 
Thank you in advance. 
  • Hi leeleeds123 -Create a measure as below to correctly work on slicers I am using ALLEXCEPT function can help preserve the necessary context while ignoring other filters that might disrupt the running total calculation.

     

    Measure:

    Diff running total in Date =
    CALCULATE(
    SUM('MASTER'[Diff]),
    FILTER(
    ALLEXCEPT('MASTER', 'MASTER'[Risk Owner]),
    ISONORAFTER('Date_Table_Risk'[Date], MAX('Date_Table_Risk'[Date]), DESC)
    )
    )

     

    Try the above and let know.

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

1 Reply

  • Hi leeleeds123 -Create a measure as below to correctly work on slicers I am using ALLEXCEPT function can help preserve the necessary context while ignoring other filters that might disrupt the running total calculation.

     

    Measure:

    Diff running total in Date =
    CALCULATE(
    SUM('MASTER'[Diff]),
    FILTER(
    ALLEXCEPT('MASTER', 'MASTER'[Risk Owner]),
    ISONORAFTER('Date_Table_Risk'[Date], MAX('Date_Table_Risk'[Date]), DESC)
    )
    )

     

    Try the above and let know.

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!