Use of DATEADD function to generate time comparisons in P&L.

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • DATEADD is a Power BI time intelligence function that we can use to generate time comparisons over a range of different time frames.
    DATEADD allows us to compare a measure to any time period, such as day, month, or quarter.
    Just by making a few tweaks in the formula, like changing the number of months or replacing month with quarter, we can easily have the data we are looking for.
    In simple terminology, we can fetch prior data of ‘n’ number of months/quarters/years with a simple DAX measure of DATEADD.
    Syntax: DATEADD (dates, number_of_intervals, interval)
    For Instance: DATEADD (date column, -20, Year); would show last 20 years data.
    In this video, I used 3 years P&L data (i.e 2017, 2018, and 2019), to exhibit the application of DATEADD function.

Комментарии •