Forum Discussion
DatesYTD returns Blank
I have a simple DATESYTD function:
CS Total = CALCULATE(sum(FinanceLog[Value]), FinanceLog[Segment0Code_1] = "CS")
CS YTD = CALCULATE([CS Total], DATESYTD('Date'[Date].[Date]))
That returns a blank. The PBI file ("FinanceTest") can be found here:
https://drive.google.com/drive/u/1/folders/1P10op_192ac_m-QGqt-QjolaLZSIMc_t
Why is it returning blank? What can I do to fix it?
Thanks in advance!
Hey Anonymous,
Thanks for the feedback the table does help to visualise it better.
What I still don't understand, regarding the Year/YearMonth table, the YTD values start adding from Apr-2017. Should the DATESYTD function not only give YTD from January until 'today'? Or only 12 months. This gives YTD values for 24 months?
Secondly, I have added the "CS Total" to your table. YTD should be Cumulative of the CS Total, yet I don't see a correlation?
Thanks!- Anonymous8 years ago
DieLem,
2017 has value from Jan to Dec, please check the calculations below.
Regards,
Lydia
6 Replies
- Greg_Deckler
Community Champion
More than likely, change your measure to this:
CS YTD = CALCULATE([CS Total], DATESYTD('Date'[Date]))I am guessing that you have this in a visual that has like month or something and so you need to pass the full Date column into the function versus the .[Date] component of that column. The time intelligencquick measures are all messed up because of this kind of thing.
- DieLem
Helper II
Hi Greg_Deckler thanks for the response.
You're solution still returns a blank. The only time I get some value back is when I change the "last date" in my date dimension table to 31/12/2018. Surely I am doing something wrong, YTD calculations shouldn't be managed by changing your Date Dimension table?Thanks!
- AnonymousNot applicable
DieLem,
About why your card visual returns blank value, please review this similar thread.
And to get correct YTD values in your scenario, please check the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1Nok2IpOEPHKleiaAXN
Regards,
Lydia