Forum Discussion

Rich_Wyeth's avatar
Rich_Wyeth
Helper I
1 year ago
Solved

Looking for Previous Period Comparision

Hi,   I am creating a report that needs to look at a date range selected and to look back a year at the same period.   I created some measures, example:  M_TPRICE = SUM('Margin Reports'[T PRICE...
  • bhanu_gautam's avatar
    bhanu_gautam
    1 year ago

    Rich_Wyeth , Go to modelling create a new table using

     

    DAX
    Calendar =
    ADDCOLUMNS (
    CALENDAR (DATE(2020, 1, 1), DATE(2023, 12, 31)),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date]),
    "Quarter", QUARTER([Date]),
    "MonthName", FORMAT([Date], "MMMM"),
    "YearMonth", FORMAT([Date], "YYYY-MM")
    )

     

    Change date as per your dates and create a relationship of this with original date column