Forum Discussion

Ben81's avatar
Ben81
Helper I
3 years ago
Solved

Two charts with dynamic dates

Hi, stuck with the following; I have two YTD charts on the same page displaying the same measure that spits out a count value on a weekly axis. The first chart shows the selected year via a slicer...
  • DataInsights's avatar
    3 years ago

    Ben81,

     

    If your primary measure is [Count], you could use the SAMEPERIODLASTYEAR function to return last year's data:

     

    Count Last Year =
    CALCULATE ( [Count], SAMEPERIODLASTYEAR ( DimDate[Date] ) )