Forum Discussion

GanesaMoorthyGM's avatar
1 year ago
Solved

YOY Growth Comparison tips

Hii community, I was working on showing growth over last year i have past 5 years of data dumbed into my db this was my calendar table Calendar (P1) = VAR MinDate = CALCULATE(MIN(fact_sales[...
  • AllisonKennedy's avatar
    1 year ago

    GanesaMoorthyGM  Is there a reason you're using so many different functions for the time intelligence? Have you marked your date table as a date table? I always try to use DATEADD function as it's very versatile and then I only need to learn one function: https://www.sqlbi.com/articles/differences-between-dateadd-and-parallelperiod-in-dax/

     

    If you don't have a filter context limiting the current period to 'last x months' or 'on or before today' or similar, then when you shift to 1 year ago, it also won't have that filter. So you'll be comparing the partial year this year with a full year last year. To overcome this you need to add a filter for on or before today, either within your measure or at the report level (depends what you want the graphs to do for forcasting).