Forum Discussion

Analitika's avatar
Analitika
Post 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?
  • 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.

1 Reply

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    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.