Forum Discussion

kagy100's avatar
kagy100
Icon for Advocate II rankAdvocate II
3 years ago
Solved

Slicer for cumulative slicing

Hi Everyone, 

 

I have a dilemma . . .

 

Is Power BI capable of cumulative slicing. For example, if I have a slicer for running total, and I select $200, I would want to see Items A, B and C instead of just Item C. 

 

Item

Value

Running Total

Bands

A

$50

$50

<$50

B

$100

$150

>$50 and <=$150

C

$50

$200

>$150 and <=$200

D

$150

$350

>$200 and <=$350

E

$50

$400

>$350 and <=$400

 

  • Thanks. I tried it but it wasn't successful. I have hence deployed a workaround which involves button slicers. These button slicers borrow logic from calculated columns. Taking the above data as an example, I created 3 calculated columns: <200, <350 and >350 using IF logic. 

     

    I then created three slicers and added the calculated columns to them. Ensure that you filter out any blank values.

     

    So, if the user clicks on <200, he is presented with Item A and B.

     

    Hope this solution helps others out there looking for a similar workaround. 

4 Replies

  • If you have a measure defined for the running total then you should be able to use that as a filter on the visual to show items less than or equal to 200

    • kagy100's avatar
      kagy100
      Icon for Advocate II rankAdvocate II

      Thanks for your reply. That will not work for the audience. Is there a way to have it as a slicer on the report ?

      • johnt75's avatar
        johnt75
        Icon for Super User rankSuper User

        You could set up a numeric range parameter for use in the slicer then create a measure like

        Item is visible =
        IF ( [Running total] <= SELECTEDVALUE ( 'Slicer table'[Value] ), 1 )
        

        Use the measure as a visual level filter to only show when the value is 1.