Forum Discussion
Line and Stacked Chart, Line Y Axis is based on a calculated column and is not displaying correctly
- 1 year ago
I understand your requirement. I did not ask you to remove the 'Item' column from x-axis, I asked you to remove the filters on 'Item' selection in your cumulative sum measure, like below:
Cumulative Total 2 = VAR CurrentDate = MAX('Staggered Stage 1 (Lots 3,4,5)'[Date Finish]) RETURN CALCULATE( SUM('Staggered Stage 1 (Lots 3,4,5)'[Cost (inc. GST)]), FILTER( ALL('Staggered Stage 1 (Lots 3,4,5)'[Date Finish],'Staggered Stage 1 (Lots 3,4,5)'[Item]), ('Staggered Stage 1 (Lots 3,4,5)'[Date Finish]) <= CurrentDate ) )P.S. I wrote the above measure, assuming your date column and Item column are from same tables, you need to modify the formula further if that is not the case.
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
Did I answer your question? Mark my post as a solution! If I helped you, click on the Thumbs Up to give Kudos.
Proud to be a Super User!
tharunkumarRTK thanks for the reply. As mentioned, I have another chart which does not include the second x-axis measure which works perfectly. However, I need the second measure so the end user can see when the cost items are incurred. Basically, I need the second x-axis items to show as an x-axis lable only, but the y-line to reference the first x-axis only (being the Date).
- tharunkumarRTK1 year ago
Super User
I understand your requirement. I did not ask you to remove the 'Item' column from x-axis, I asked you to remove the filters on 'Item' selection in your cumulative sum measure, like below:
Cumulative Total 2 = VAR CurrentDate = MAX('Staggered Stage 1 (Lots 3,4,5)'[Date Finish]) RETURN CALCULATE( SUM('Staggered Stage 1 (Lots 3,4,5)'[Cost (inc. GST)]), FILTER( ALL('Staggered Stage 1 (Lots 3,4,5)'[Date Finish],'Staggered Stage 1 (Lots 3,4,5)'[Item]), ('Staggered Stage 1 (Lots 3,4,5)'[Date Finish]) <= CurrentDate ) )P.S. I wrote the above measure, assuming your date column and Item column are from same tables, you need to modify the formula further if that is not the case.
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
Did I answer your question? Mark my post as a solution! If I helped you, click on the Thumbs Up to give Kudos.
Proud to be a Super User!
- Han_Solo1 year agoRegular Visitor
tharunkumarRTK Thank you very much, that seems to have solved it! So, for my understanding, is the extra FILTER of 'Staggered Stage 1 (Lots 3,4,5)'[Item]), allowing the Line-y values to read from the Date Finish column? If so, what is the original filter of 'Staggered Stage 1 (Lots 3,4,5)'[Date Finish] doing?