Forum Discussion

harshadrokade's avatar
harshadrokade
Post Partisan
4 years ago
Solved

Disable specific filter on tooltip chart

Hi All, Appreacite your help on his in advance.   I have below data Month-DD/MM/YYYY Value Student name Subject name 01/01/2020 100 A ABC1 01/03/2020 80 A ABC1 01/08/2020 90...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi harshadrokade,

    I think you need to change your tooltip report page DAX expression to add 'all' functions to ignore the current filter and add variables to store and calculate the previous date period.

    Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI

    Then you can use this variable as a condition to calculate corresponding results.

    formual =
    VAR currDate =
        MAX ( Table[Date] )
    VAR prevDate =
        DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
    RETURN
        CALCULATE (
            SUM ( Table[Value] ),
            FILTER ( ALL ( Table ), [Date] = prevDate ),
            VALUES ( Table[Student name] ),
            VALUES ( Table[Subject name] )
        )

    Regards,

    Xiaoxin Sheng