Forum Discussion

davidibarrag's avatar
davidibarrag
Helper I
2 years ago
Solved

Problem with Matrix Actual and Last Month

Does anyone is having problems with the matrix in Power BI visualizations when trying to compare actuals vs past months in May 2024 update? I have a reports in previous updates and the same matrix works fine and with this one it does not work the way it has to. The DAX formula to calculate the Sales Q Last Month is the following:

 
Sales Q Last Month =
CALCULATE(
    [Sales Q],
    DATEADD(
        Date[Start of Month],
        -1,
        MONTH
    )
)

  • If the DATEADD function is not working try using this DAX and see if it works.

    Sales Q Last Month =
    CALCULATE(
    [Sales Q],
    PARALLELPERIOD(
    'Date'[Date],
    -1,
    MONTH
    )
    )

    Also you can check using "SAMEPERIODLASTYEAR" function. Additionally check if the date table is marked as a date table.
    Let me know if this works.

1 Reply

  • If the DATEADD function is not working try using this DAX and see if it works.

    Sales Q Last Month =
    CALCULATE(
    [Sales Q],
    PARALLELPERIOD(
    'Date'[Date],
    -1,
    MONTH
    )
    )

    Also you can check using "SAMEPERIODLASTYEAR" function. Additionally check if the date table is marked as a date table.
    Let me know if this works.