Forum Discussion
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
- AnonymousNot 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!
- rtneupaneFrequent 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
- AnonymousNot applicable
I have the same question
- AnonymousNot 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?
- Jcarlos9New Member
this is my question!!
- Mr_GlisterAdvocate II
Really good idea and perfect instructions!
- AnonymousNot 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.
- Olivier1Regular 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-msftCommunity 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
- flavourabbitFrequent 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
2016 UK 400 -50 -200 -100 50 2016 France 3000 -230 -300 -50 2420 2016 Germany 4000 -440 -400 -50 3110 2016 Belgium 2000 -1000 -500 -500 0 2017 UK 600 -200 -300 -100 0 2017 France 4000 -600 -400 -50 2950 2017 Germany 5000 -600 -500 -50 3850 2017 Belgium 3000 -1200 -600 -500 700 - v-yuta-msftCommunity 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
- AnonymousNot 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.
- AnonymousNot applicable
Over two years later and it looks like this is still impossible for PowerBI... possible for PowerPivot, but not PowerBi. hmm