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
Anne25
Frequent Visitor

Waterfall chart: how are totals calculated?

Hi all,

 

I am trying to make a waterfall chart to show the impact of price, quantity, new and discontinued products on revenue. 

 

I have found a very good start on https://businessintelligist.com/2017/04/03/price-volume-mix-analysis-using-power-bi/

Below you see the outcome of following this method. The Y-axis in the waterfall chart is a switch formula for the different blocks in this waterfall chart (price, volume, mix, new products, discontinued products).

Original bridge.JPG

 

 
 

However, I would like to show this evolution from prior year to current year. By adding PY in the switch formula (and in the column to which the switch is referring), I already obtained the following:

 

Trial 1 bridge.JPG

 
 

The numbers are exactly how I want it, but I would like the PY block in the total color and text "CY" instead of "Total" on the x-axis. Would anyone know how to do this? Or can someone tell me how the totals are calculated in a waterfall so I know how I can write a measure for the totals that I can combine with the measure for the different blocks (volume, new products, mix, price and discontinued products)? 

 

Many thanks in advance!

 

Anne

 

6 REPLIES 6
Anne25
Frequent Visitor

Hi,

 

As no one seems to know the answer, can I assume that it is not possible in PBI to show previous year and current year as total in my case? And that no one exactly knows how the totals are calculated in a waterfall chart?

 

Kind regards,

Anne

Anne25
Frequent Visitor

Hi all,

 

Does anyone know how I can make PY and CY in the color of "Total"? Or can someone explain me how totals are calculated in a waterfall chart?

 

Many thanks in advance.

 

Anne

Greg_Deckler
Community Champion
Community Champion

Two options as I see it. Create a text visual and place it over the Total. Hacky but quick.

 

Otherwise, well, honestly I don't know, I'd have to see your data to understand how to construct that measure. Is that in the link?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

Yes, in that link there is a link to download the PBI file.
Only thing I added to this file is an additional table PVM_trial1 for reference in the switch.

Additional table.JPG

And I have tweeked the switch in the original PVM measure:

PVMix_trial1 =
VAR PriceImpact =
SUMX(
ADDCOLUMNS(
VALUES('Product'[Product]),
"Price", ([Volume PY])
* (
if(
ISBLANK([Price PY]) || ISBLANK([Price CY]) ,
0 ,
[Price CY] - [Price PY]
)
)
) ,
[Price]
)

var VolumeImpact =
SUMX(
ADDCOLUMNS(
VALUES('Product'[Product]) ,
"Volume" , ([Price PY])
* (
if(
ISBLANK([Price PY]) || ISBLANK([Price CY]) ,
0 ,
[Volume CY] - [Volume PY]
)
)
) ,
[Volume]
)

var MixImpact =
SUMX(
ADDCOLUMNS(
VALUES('Product'[Product]),
"Mix",
if(
ISBLANK([Price PY]) || ISBLANK([Price CY]) ,
0 ,
([Price CY] - [Price PY])
)
* ([Volume CY] - [Volume PY])
) ,
[Mix]
)

Var NewProductImpact =
sumx(
ADDCOLUMNS(
VALUES('Product'[Product]) ,
"New" ,
if(
ISBLANK(Sales[Sales PY]) || Sales[Sales PY] = 0 ,
Sales[Sales CY] ,
0
)
) ,
[New]
)

var DiscontinuedProductImpact = Sales[Sales YoY]
- VolumeImpact
- NewProductImpact
- PriceImpact
- MixImpact

return

SWITCH(
max('PVM_trial1'[Index]),
1 , Sales[Sales PY] ,
2 , PriceImpact,
3 , VolumeImpact ,
4 , MixImpact ,
5 , NewProductImpact,
6 , DiscontinuedProductImpact ,
BLANK()
)

 

Then my outcome is this, but I am now trying to understand how the totals are calculated so I can make show PY and CY as a total.

Trial 1 bigger.JPG

amitchandak
Super User
Super User

@Anne25 , refer if this can help

https://community.powerbi.com/t5/Desktop/Change-the-total-label-in-waterfall-chart/m-p/598484

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak , thank you for your help. 

 

The solution in your link suggests to paste a text box "CY" over the text "Total".

 

However, then I am still looking for a way to change the color of the PY block to the blue color of total.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.