Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dgyurdieva
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
v-caliao-msft
Employee
Employee

@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

View solution in original post

2 REPLIES 2
v-caliao-msft
Employee
Employee

@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

Thank you 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.