Forum Discussion
Stacked Bar Waterfall - problems with Measures and Calculated Columns
Ok, I finally got what you are trying to do. But. Will your data only contain data for january or february? Because hard coding this works in a simple data set like this, but what happens when you have 2 years worth of data? How should it be displayed?
That is the point...I don't want to hard code it. I have hard coded it to start with simply to show what I want to display, but my ideal solution is to use Measures so that the visualization is dynamic. I included some simple pictures in the OP of what I want it to look like...do they display for you?
Being able to compare 2 months would be a start...the approach I was trying to pursue using Measures and a calculated column could be scaled Jan, Feb, Mar etc and then use a SWITCH statement...not very elegant I know but workable. But that is moot given the constraints of Calculated columns.
Obviously a fully scalable, elegant solution would be ideal but I will take what I can get for the moment.
Is there some Measure command that allows me to say something like:
Measure=IF(Month = "JanJoin" and Type = "x" then [Jan], else if Month = "JanLeave" and Type = "x" then [Feb], else if.... etc etc
or
Measure= SWITCH(TRUE(), Month="JanJoin" && Type = "x",[Jan],Month = "JanLeave" && Type = "x",[Feb],
one problem I can see is that using the conditional test "Month =" is looking up a 'naked' column.
- sturlaws6 years ago
Resident Rockstar
do you need have the employees as legend?
- ghdunn6 years ago
Helper III
No Sturla...not necessarily. However I would want to be able to use Type as a legend.
Thanks for the time you are taking on this...much appreciated
Gerald
- sturlaws6 years ago
Resident Rockstar
So, here is a draft: pbix
I have added data for march as well. In power query a new table is generated, so that the values that goes on the x-axis is dynamically handled.
And the measure is dynamic as well. The DAX of the measure might look a bit scary, but it is not very complex DAX.