Forum Discussion

PowerRocky12's avatar
PowerRocky12
Helper I
4 years ago
Solved

YTD Multi Year Comparison

Hey,   I am hoping someone can help me. This slicer would filter my tables to show YTD for all fiscal years within that table or chart. I haven't found anything that has really worked. I have attac...
  • PowerRocky12's avatar
    PowerRocky12
    4 years ago

    I used this formula and got my expected results:

    YTD Amount =
    VAR _SOY="04/01/" & YEAR(TODAY())
    VAR _DOY=DATEDIFF(_SOY,TODAY(),DAY)
    VAR SPPY=
    CALCULATE(sum('Table'[Amount]),FILTER('Calendar','Calendar'[Day of Fiscal Year Number]<=_DOY))
    RETURN
    SPPY