Forum Discussion

Janoshz's avatar
Janoshz
Frequent Visitor
3 years ago
Solved

Year to date empty values

Hello,

I have a cumulative value and it is compared in a line chart by Year to date and Past year to date. I'd like that YTD did not show the values that are in the future. 

 

My DAX measure is

 

YearToDate = CALCULATE([MEASURE1], DATESYTD('Calendar'[Date]), ALLEXCEPT('Calendar', 'Calendar'[Year]))

Thanks guys πŸ™‚
  • Ah, well. I got it on my own πŸ™‚

    YearToDate = CALCULATE([MEASURE1, DATESYTD('Calendar'[Date]), FILTER(ALL('Calendar'[Date]), 'Calendar'[Date] <=MAX('Accomplishment'[ReportingDate])))

2 Replies

  • Janoshz's avatar
    Janoshz
    Frequent Visitor

    Ah, well. I got it on my own πŸ™‚

    YearToDate = CALCULATE([MEASURE1, DATESYTD('Calendar'[Date]), FILTER(ALL('Calendar'[Date]), 'Calendar'[Date] <=MAX('Accomplishment'[ReportingDate])))
  • Perhaps this help?:
    YearToDate = 
    CALCULATE([MEASURE1]DATESYTD('Calendar'[Date]), FILTER(ALLEXCEPT('Calendar''Calendar'[Year]),('Calendar'[Date]<TODAY()))