cancel
Showing results for
Did you mean:
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:

 date client game amount 1.1.2017 A Game1 5 1.1.2017 A Game3 6 1.1.2017 B Game5 6 1.1.2017 C Game2 6 1.2.2017 D Game2 6 1.3.2017 D Game2 6 1.3.2017 A Game2 7 1.3.2017 C Game1 8 1.3.2017 D Game3 4 1.3.2017 D Game5 3 1.4.2017 B Game2 2 1.4.2017 B Game2 4 1.4.2017 A Game2 65 1.5.2017 A Game2 7 1.6.2017 B Game1 7 1.6.2017 C Game3 54 1.6.2017 D Game5 4 1.6.2017 D Game2 3 1.7.2017 A Game2 3 1.8.2017 C Game2 3 1.8.2017 D Game2 3 1.8.2017 D Game1 2 1.8.2017 B Game3 2 1.9.2017 B Game5 2 1.9.2017 B Game2 23 1.9.2017 B Game2 45 1.9.2017 B Game2 566 1.10.2017 B Game2 66 1.11.2017 B Game2 66 1.12.2017 B Game2 66

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
Highlighted
Moderator

## Re: Cumulative Measures based on filter selection

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])))

Regards,

Charlie Liao

2 REPLIES 2
Highlighted
Moderator

## Re: Cumulative Measures based on filter selection

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])))

Regards,

Charlie Liao

Frequent Visitor

## Re: Cumulative Measures based on filter selection

Thank you

Announcements

#### Back to School Contest

Engage and empower students with Power BI!

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

#### PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Top Kudoed Authors
Users Online
Currently online: 21 members 770 guests
Recent signins: