Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Running total with ALL() is affected by visual filter

Dear power bi community,   I have a weird problem. Trying to write a calculated measure to calculate a running total by category. The calculation is working so far, however I have problems when usi...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, Anonymous 

    If your just want the four slicers (filters) on the page are affected, please try formula as below:

     

    RunningTotal =
    VAR MaxCategory =
        MAX ( table[category] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( table[issues] ),
            FILTER (
                ALL ( table ),
                table[slicer_1] = MAX ( table[slicer_1] )
                    && table[slicer_2] = MAX ( table[slicer_2] )
                    && table[slicer_3] = MAX ( table[slicer_3] )
                    && table[slicer_4] = MAX ( table[slicer_4] )
                    && table[category] <= MaxCategory
            )
        )

     

    Best Regards,
    Community Support Team _ Eason