Forum Discussion
Waterfall Chart not using dates
- 9 years ago
I see in your dataset, the first step should be doing a unpivot.
Then replace the currency symbol with blank and convert that column to whole number.
In the waterfall chart, use the attribute and value column.
As to the axis order in the waterfall chart, check this thread Sorting Data Manually.
Check more details in the attached pbix file.
- 9 years ago
Add columns through the query editor uses M language not DAX (click "Advanced Editor" in the query pane to see the M code)
If you instead create a calculated column on the report layout page, your code is accurate.
Hope this helps
David
I see in your dataset, the first step should be doing a unpivot.
Then replace the currency symbol with blank and convert that column to whole number.
In the waterfall chart, use the attribute and value column.
As to the axis order in the waterfall chart, check this thread Sorting Data Manually.
Check more details in the attached pbix file.
Ok so that works fine thank you all, except the cost elements should be minuses/decreases, so sales and margin should be positive the rest multiplied by -1
I tried to insert a column into the table using this formula
IF(AND([Attribute]="Net Sales Amount",[Attribute]="Gross Margin"),[Value],[Value]*-1)
but its telling me that "IF" wasnt recognized?
- dedelman_clng9 years agoCommunity Champion
Add columns through the query editor uses M language not DAX (click "Advanced Editor" in the query pane to see the M code)
If you instead create a calculated column on the report layout page, your code is accurate.
Hope this helps
David
- Schoif-D9 years agoHelper I
Ok David thank you, im use to VBA and Excel formulas, am very new to Power BI and DAX, amd M and R, so am itrying to get my head around it, thank you for explaining the problem, i will give it a go see if i can get it done :)
- Schoif-D9 years agoHelper I
That was so much easier doing the formula in the report layout, took less than a minute, youre right i was trying to do that formula in the query editor
Thank you