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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ase
Frequent Visitor

Waterflow chart with measures

Hi all, 

 

I am trying to make a Watefall chart which includes the differences between 2 measures. 

 

I have the following table:

 

ProductScenarioValue Region
BananasActual10Asia
ApplesActual12Asia
LemonsActual14Asia
OrangesActual16Asia
BananasBudget 11Asia
ApplesBudget 14Asia
LemonsBudget 14Asia
OrangesBudget 12Asia
BananasActual10Europe
ApplesActual12Europe
LemonsActual14Europe
OrangesActual16Europe
BananasBudget 11Europe
ApplesBudget 14Europe
LemonsBudget 14Europe
OrangesBudget 12Europe

 

And I have 2 measures, which show the Actuals and Budget for a Product group. 

So measure 1 shows Total Value Budget for Apples etc.

and measure 2 shows Total Value Actuals for Apples etc.

 

I have created a Selector for the Product (Apples etc.) so it serves as a filter betwen the Product types

 

The idea is to create a Wateflow chart, which has the Budgt on the left, all the deviations between Budget and Acutals and then Acutals on the Right. The value below should be the Regions. 

 

I saw online that I need to create an additional table, but this is where I get lost. 

 

Is anyone able to help with some guideance? 

 

Kind regards,

A

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @ase 

According to your description, you want to " Create a Wateflow chart, which has the Budgt on the left, all the deviations between Budget and Acutals and then Acutals on the Right. The value below should be the Regions and you have a [Product] slicer ".

Thanks for your sample data first! Here are the steps you can refer to :
(1)My test data is the same as yours.

vyueyunzhmsft_0-1682910085577.png

(2)We can create  a blank query in Power Query Editor to create a dimension table .You can put this M code in "Adcanced Editor" to refer to :

let
    Source = {"Budget"} & List.Distinct( Table[Region]) & {"Actual"},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Index", 1, 1, Int64.Type)
in
    #"Added Index"

vyueyunzhmsft_1-1682910149632.png

And we need to create a relationship between two tables:

vyueyunzhmsft_2-1682910215298.png

(3)Then we can create a measure like this:

Measure = var _row = MAX('Query1'[Column1])
var _actual_t =SUMX( FILTER( ALLSELECTED('Table') , 'Table'[Scenario]="Actual") , [Value])
var _budget_t =SUMX( FILTER( ALLSELECTED('Table') , 'Table'[Scenario]="Budget") , [Value])
var _actual =SUMX( FILTER( 'Table' , 'Table'[Scenario]="Actual") , [Value])
var _budget  =SUMX( FILTER( 'Table' , 'Table'[Scenario]="Budget") , [Value])

return
IF(_row = "Actual",_actual_t, IF( _row = "Budget" , _budget_t  ,_actual-_budget))

 

(4)For your need , we need to add a Custom visual called "Simple Waterfall" :

vyueyunzhmsft_3-1682910295586.png

Then we can put the fields we need on the visual:

vyueyunzhmsft_4-1682910324727.png

For your need , we need to close the "Show Cumlative Total" in the "Define Pillars" and then open the "Actual" as total:

vyueyunzhmsft_5-1682910357054.png

vyueyunzhmsft_6-1682910401127.png

 

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @ase 

According to your description, you want to " Create a Wateflow chart, which has the Budgt on the left, all the deviations between Budget and Acutals and then Acutals on the Right. The value below should be the Regions and you have a [Product] slicer ".

Thanks for your sample data first! Here are the steps you can refer to :
(1)My test data is the same as yours.

vyueyunzhmsft_0-1682910085577.png

(2)We can create  a blank query in Power Query Editor to create a dimension table .You can put this M code in "Adcanced Editor" to refer to :

let
    Source = {"Budget"} & List.Distinct( Table[Region]) & {"Actual"},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Index", 1, 1, Int64.Type)
in
    #"Added Index"

vyueyunzhmsft_1-1682910149632.png

And we need to create a relationship between two tables:

vyueyunzhmsft_2-1682910215298.png

(3)Then we can create a measure like this:

Measure = var _row = MAX('Query1'[Column1])
var _actual_t =SUMX( FILTER( ALLSELECTED('Table') , 'Table'[Scenario]="Actual") , [Value])
var _budget_t =SUMX( FILTER( ALLSELECTED('Table') , 'Table'[Scenario]="Budget") , [Value])
var _actual =SUMX( FILTER( 'Table' , 'Table'[Scenario]="Actual") , [Value])
var _budget  =SUMX( FILTER( 'Table' , 'Table'[Scenario]="Budget") , [Value])

return
IF(_row = "Actual",_actual_t, IF( _row = "Budget" , _budget_t  ,_actual-_budget))

 

(4)For your need , we need to add a Custom visual called "Simple Waterfall" :

vyueyunzhmsft_3-1682910295586.png

Then we can put the fields we need on the visual:

vyueyunzhmsft_4-1682910324727.png

For your need , we need to close the "Show Cumlative Total" in the "Define Pillars" and then open the "Actual" as total:

vyueyunzhmsft_5-1682910357054.png

vyueyunzhmsft_6-1682910401127.png

 

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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