cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dgyurdieva Frequent Visitor
Frequent Visitor

Cumulative Measures based on filter selection

Hi I have a rather difficult question I want to ask. 

I want to calculate and display on a graph a cumulative amount based on a selected filter by the user of the dashboard.

So my data looks like this:

dateclientgameamount
1.1.2017AGame15
1.1.2017AGame36
1.1.2017BGame56
1.1.2017CGame26
1.2.2017DGame26
1.3.2017DGame26
1.3.2017AGame27
1.3.2017CGame18
1.3.2017DGame34
1.3.2017DGame53
1.4.2017BGame22
1.4.2017BGame24
1.4.2017AGame265
1.5.2017AGame27
1.6.2017BGame17
1.6.2017CGame354
1.6.2017DGame54
1.6.2017DGame23
1.7.2017AGame23
1.8.2017CGame23
1.8.2017DGame23
1.8.2017DGame12
1.8.2017BGame32
1.9.2017BGame52
1.9.2017BGame223
1.9.2017BGame245
1.9.2017BGame2566
1.10.2017BGame266
1.11.2017BGame266
1.12.2017BGame266

 

The dates are repeated as well as the clients anga games. I managed to calculate a cumulative amount based on the date only by creating a new table with 1 date per row and summing the amount per date, then cumulating it. However, on the page with my graph I have filters for client and game. So when 1 client is chosed I want the cumulative amount on the graph to be recalculated for that chosen client. 

 

Any thoughts on that?

I will be very grateful for any help on the issue. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-caliao-msft
Moderator

Re: Cumulative Measures based on filter selection

@dgyurdieva,

 

If you create a cumulative total measure, then the cumulative amount on the graph to be recalculated when a client is selected in the slicer.

Measure = CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]<=MAX(Sheet1[date])))
Capture.PNGCapture1.PNG

 

Regards,

Charlie Liao

2 REPLIES 2
Moderator v-caliao-msft
Moderator

Re: Cumulative Measures based on filter selection

@dgyurdieva,

 

If you create a cumulative total measure, then the cumulative amount on the graph to be recalculated when a client is selected in the slicer.

Measure = CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]<=MAX(Sheet1[date])))
Capture.PNGCapture1.PNG

 

Regards,

Charlie Liao

dgyurdieva Frequent Visitor
Frequent Visitor

Re: Cumulative Measures based on filter selection

Thank you Smiley Happy