Forum Discussion
Data changing when adding legend
I have a column chart that shows running total of distinct Login by week date.
I then add a legend to the same chart but the distinct count CHANGES (see total values above column). I am unable to understand why this is happening, and also how do I fix it?
The "Running Total" is a measure that i wrote, please see screenshot. Please see screenshot. Cant post pbix file due to limitations.
Any feedback would be appreciated.
7 Replies
- lbendlinSuper User
your running total calculation is not correct. You need to move the MAX() part outside of the CALCULATE() part (by using a variable). Pseudo code:
Running Total = var m = MAX([Date]) return calculate(distinctcount([NewLogin]),[Date]<=m) - lbendlinSuper User
That's a good one. What the measure does is show the cumulative total for each department. That is clearly different from the cumulative total across all departments.
So the measure works correctly, but it doesn't give you the result you expected. The question is if your expected result actually makes sense?