Forum Discussion

flavourabbit's avatar
flavourabbit
Frequent Visitor
8 years ago

Waterfall Chart using multiple measures

Hello,

 

I know this must've been an old topic in Business Intelligence.

However, I didn't find any idea to realize what I'd like to achieve.

 

The thing is I'd like to create a Waterfall Chart with multiple measures.

Let's say that there's Fact Table containg accounting data (Revenues, Costs, Profits)

 

Thus it's a kind of running total, I can expect to draw the chart.

(Which item is main cause of profit decrease e.g., Ads/Logistics)

 

However, only solution I found at Google is restructuring the dataset like below

I don't think it's a good idea to manipulate the fact table, plus if I create another table, all the current measure refering the Table A would be not working with newly made one.

 

Is there any way to solve this?

 

Many thanks,

 

 

30 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    Yes, you can do it via a workaround in DAX formula and a control table.

    1. Create a table with matching "measure" name:

     

     

     

     

     

    2. Create an additional measure for your waterfall chart, you may apply + or - for your measure to get the waterfall sentiment:

    Waterfall value = 
        SWITCH (
            SELECTEDVALUE ( Table1[Index] );
            1; +[Measure 1];
            2; +[Measure 2];
            3; -[Measure 3];
            BLANK()
        )

    3. Apply the new measure in your waterfall chart, with the category based on the table field created (Note that you need to sort it via the category, use hierarchical drill-down if needed):

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Cheers!

    • rtneupane's avatar
      rtneupane
      Frequent Visitor

      Thanks a lot for this. How can I make the color of starting bar and end bar same? basically i want to show 1st bar as begining value. then all components and then fianlly end value. I want to set these 2 bars as total and different color from increase/decrease

       
      • Anonymous's avatar
        Anonymous
        Not applicable

        I have the same question

         

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi..Thanks for this solution. But how can you remove Total bar?? In my case, total bar is undesirable...moreover, can we change the colour of first and last bars to keep in lookalike?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Are you able to confirm that the idea posted above worked succesfully? I haven't had time to revisit this, but if it worked for you I will mark it as the solution. 

  • Olivier1's avatar
    Olivier1
    Regular Visitor

    You can actually create a new table containing the names of your measures (You can write them manually). You can then use this table as your category in your waterfall and create a new measure for your Y axis. My measure looks like ; WF Measures = VAR Meas = SELECTEDVALUE('Waterfall 2'[Column1]) return SWITCH(TRUE(); Meas = "Ending Inventory (LY)" ;1 ;Meas = "Beginning Inventory (Feb)";-1 ; Meas = "Production" ; 1; Meas = "Sales" ; -1;Meas = "Interco & Adjustments *" ;4 ;Meas = "Ending Inventory (Act)" ; 1; -10) **You can replace the numbers with the measure you want it to calculate**

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi flavourabbit,

     

    "

    However, only solution I found at Google is restructuring the dataset like below

    I don't think it's a good idea to manipulate the fact table, plus if I create another table, all the current measure refering the Table A would be not working with newly made one.

    "

     

    <--- Could you please clarify more details or give a demo about your fact table, Table A, current measures and expected result?

     

    Regards,

    Jimmy Tao 

    • flavourabbit's avatar
      flavourabbit
      Frequent Visitor

      Hello,

       

      I've made some dummy data to explain my situsation.

      Below is the fact table (originally the # of column is much larger than this)

        

       

       With measures like SumofNetSales or SumofSalesExpense, I'd like to draw the below waterfall chart in Power BI.

      This is because I'd like to compare which account had a effect on overall profit between year 2016 and 2017.

       

      Do you know how can I materialize the waterfall chart in Power BI 

       

       

       

      * FYI, the below is pasted dummy data

       (as xlsx file is encrypted through DRM)

       

      YearLocationNet SalesSales ExpenseProduction CostOther OHEBIT

      2016UK400-50-200-10050
      2016France3000-230-300-502420
      2016Germany4000-440-400-503110
      2016Belgium2000-1000-500-5000
      2017UK600-200-300-1000
      2017France4000-600-400-502950
      2017Germany5000-600-500-503850
      2017Belgium3000-1200-600-500700
      • v-yuta-msft's avatar
        v-yuta-msft
        Community Support

        Hi flavourabbit,

         

        Click Editor Queries, click on [Net Sales], [sales Expense], [Production Cost], [Other OH], [EBIT], then click Transform-> Unpivot Columns, table after transforming is like below:

         

        Then drag [Attribute] and [Year] to Category, drag [Value] to Y-axis, the result looks like this:

         

         

        Regards,

        Jimmy Tao

  • Anonymous's avatar
    Anonymous
    Not applicable

    I'm having the exact same issues as well with multiple measures not working in the Waterfall visual. I was hoping that there would have been a solution by now but I guess not :( 

     

    I created a mock up of the data so I could show the database guys what I was trying to achieve and it doesn't look like it's possible without creating a completley new table with the specific purpose of providing this visual - which is probably not going to happen.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Over two years later and it looks like this is still impossible for PowerBI... possible for PowerPivot, but not PowerBi. hmm