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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

PROBLEM: Waterfall chart with change value / Running Total

Hello, I am currently working on a waterfall chart. I only have the "change" values. So waterfall chart is not working. I tried to solve this with a running total which is not perfectly working, as it does not show me the running total for the "total" of the given categories. Does anyone have a solution to this? 

This is the basic principle of the table:

 

Day

Change

Values

01.01.2020

Mix

100

01.04.2020

Mix

0

01.07.2020

Increase

90

01.07.2020

Mix

50

01.07.2020

Decrease

-20

01.12.2020

Mix

0

01.12.2020

Increase

0

01.12.2020

Decrease

0

01.01.2021

Increase

100

01.01.2021

Decrease

-100

01.05.2021

Decrease

-20

 

I used the following code:

 

Running Total = 
CALCULATE(
	SUM('Modell (2)'[Values]),
	FILTER(
		ALL('Modell (2)'),
		'Modell (2)'[DAY] <= MAX('Modell (2)'[DAY]) && 'Modell (2)'[Change] = MAX('Modell (2)'[Change]
	)
))

 

 

Now it gives me the running total by category (change), but it does not show me the sum of the running totals.

Screenshot 2021-02-09 233609.jpg

The data should add up in total and within the categories the values should also add up further if there is no value in a quarter.

Hope I could explain the issue

Thanks for the help

Jonas

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Sorry about that.

 

Running Total = 
var d=max('Modell (2)'[DAY])
var c=max('Modell (2)'[Change])
var ov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[Change]=c && 'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
var tov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
return if(isfiltered('Modell (2)'[Change]),ov,tov)

View solution in original post

6 REPLIES 6
lbendlin
Super User
Super User

No, that is not possible unless you want to do cross join acrobatics, or add fake 0 value transactions for the gaps.

Anonymous
Not applicable

Alright. Still awesome that helps already a lot! 

lbendlin
Super User
Super User

Sorry about that.

 

Running Total = 
var d=max('Modell (2)'[DAY])
var c=max('Modell (2)'[Change])
var ov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[Change]=c && 'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
var tov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
return if(isfiltered('Modell (2)'[Change]),ov,tov)
Anonymous
Not applicable

Total looks good now but is it also possible to have also the other values copied down? So that in Qrt 2 2021 we see -140,190,150
Then it looks perfect.
Thanks!!!!

lbendlin
Super User
Super User

Try this version instead:

 

 

Running Total = 
var d=max('Modell (2)'[DAY])
var c=max('Modell (2)'[Change])
var ov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[Change]=c && 'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
var tov=sumx(filter(ALL('Modell (2)'),'Modell (2)'[DAY]<=d),'Modell (2)'[Values])
return if(HASONEVALUE('Modell (2)'[Change]),ov,tov)

 

Anonymous
Not applicable

Hi @lbendlin ,  thanks a lot for your help and the proposal, looks quite good already, only for the last quarter it shows me the wrong total. I assume it is because the negative value is the only value? How can I fix that? Best would be to have the running total in every line.

jonasabb_0-1613388825897.png

Thank you for your help 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.