Forum Discussion
Total YTD does not work
I have a table which I use to override a SUM measurement. This works fine in overriding the Sum measurement. However when I apply DATESYTD function on this measurement, I get incorrect results. My model is setup correctly to support time-intelligence functions. For 2020 which does not have a manual override value, the DATESYTD function is working fine. Below is the Dax with my results. It is required that I have YTD value. I also tried TOTALYTD function and got the same results. Any ideas to make this work?
#New Term Policy Override = Sum(NewTermOverride[NewTermCount])
#New Term Policy Prelim = SUM('Fact_Policy'[NewTermCount])
#New Term Policy = If (Isblank('Fact_Actual'[#New Term Policy Override]),'Fact_Actual'[#New Term Policy Prelim],'Fact_Actual'[#New Term Policy Override]) This formula is getting the correct value.
#New Term Policy YTD = CALCULATE([#New Term Policy],DATESYTD('Calendar'[Date])) This formula is getting the incorrect value.
5 Replies
- AnonymousNot applicable
Hi Anonymous ,
Let me know if this worksMeasure = CALCULATE (
[#New Term Policy],
FILTER (
ALL ( Calendar ),
'Calendar'[Date]
<= MAX ( 'Calendar'[Date] )
&& YEAR ( 'Calendar'[Date] )
= YEAR (
MAX ( 'Calendar'[Date] )
)
)
)Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- AnonymousNot applicable
Thanks for the suggestion. I got the same result. It is not working.
Any other ideas?
- AnonymousNot applicable
Anonymous ,
What i understand from your visual is taht Report Date is not part of the Date Table.
You need to pull the Date from the Date table in the visualization.
Regards,
HN
Can you share your model and some sample date in text format.