Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Previous Year To Date

Hi,   Apologies as I know this has been asked and answered numerous times before.   I'm trying to get the sales for LY 01/01/2022 to todays date but unsure on how to go about it.   I tried to u...
  • FreemanZ's avatar
    3 years ago

    hi Anonymous 

    you need some code to reflect YTD, try like:

    CALCULATE(
        SUM(Transactions[Sales]),
        DATESYTD(SAMEPERIODLASTYEAR(Calendar[Date]))
    )