Forum Discussion

Analitika's avatar
Analitika
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

DATESYTD only last selected year

I have measure   Fact = CALCULATE([FactTbl], DATESYTD('Date'[Date]))   how to tell this measure to calculate only last (max) selected year values?
  • V-lianl-msft's avatar
    5 years ago

    Hi Analitika ,

     

    Please try to create measure like this:

    Measure 2 = var max_year = CALCULATE(MAX(financials[Year]),ALLSELECTED(financials))
    return CALCULATE([Measure],FILTER(DATESYTD('Table'[Date]),max_year=YEAR('Table'[Date])))

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.