Hello,
I was trying to calculate YTD running total with few different approaches:
1) YTDCalculate = CALCULATE( SUM( Repairs[Repairs]), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( Repairs[Date] )))
2) YTDCalculate2 = IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX (Repairs[Date]), ALL ( Repairs ) ), CALCULATE ( SUM ( Repairs[Repairs] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) ) )
3) YTDtotalYTD = TOTALYTD(sum(Repairs[Repairs]),'Calendar'[Date])
All of them provide correct expected output if I display them in table form, but if I try to make a line/bar chart it became very confusing:
1) YTDCalculate - works fine, as needed
2) YTDCalculate2 - for some reason only totals shown
3) YTDtotalYTD - ignored, not recognised by line/bar charts
Could somebody please clarify on this? Why the behaviour of these calculations are different in table and line/bar chart?
Why TOTALYTD is not recognised in line/bar chart?
If any of these formulas needs improvement - your help would be very appreciated.
Here is the screenshot:
Thanks a lot in advance!
Best regards,
Sasha