Forum Discussion
Help needed for Waterfall chart with binary values
- Anonymous2 years ago
Hi Natrify ,
When you calculate the first of the month, he can easily figure out the.However, the calculation of 1 for the previous month does not show up in the waterfall plot, due to the insignificant difference between the previous month and this one.
If you calculate the difference between 1 and 0 for the current month, it is calculable and shows up normally in the waterfall charts.
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
I've figured out a way to do what I want. First of all I neded to make a month column in the data.
Month = FORMAT(Data[Date], "yyyy, mmmm")Change the format of the column to date:
Next I made a Dax code that gets previous month, and current month then calculates the difference, I needed to us parallel period for this:
Diff month-on-month = VAR LM = CALCULATE(SUM(Data[Binary]), PARALLELPERIOD(Data[Month], -1, MONTH)) VAR CM = SUM('Data'[Binary]) RETURN CM - LMSince What I need to count is in binary format, I can use SUM to get only the '1's and filter out the zero values.
Next I create a waterfall, add in my month-on-month measure into the y-axis, and add in the month column into the category field. Whats important here is to make sure you aren't using the hierarchy format for the Waterfall visual:
I've figured out a way to do what I want. First of all I neded to make a month column in the data.
Month = FORMAT(Data[Date], "yyyy, mmmm")Change the format of the column to date:
Next I made a Dax code that gets previous month, and current month then calculates the difference, I needed to us parallel period for this:
Diff month-on-month =
VAR LM = CALCULATE(SUM(Data[Binary]), PARALLELPERIOD(Data[Month], -1, MONTH))
VAR CM = SUM('Data'[Binary])
RETURN
CM - LMSince What I need to count is in binary format, I can use SUM to get only the '1's and filter out the zero values.
Next I create a waterfall, add in my month-on-month measure into the y-axis, and add in the month column into the category field. Whats important here is to make sure you aren't using the hierarchy format for the Waterfall visual: