Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
davidibarrag
Helper I
Helper I

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
    )
)

Imagen1.pngImagen2.png

1 ACCEPTED SOLUTION
sroy_16
Resolver II
Resolver II

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.

View solution in original post

1 REPLY 1
sroy_16
Resolver II
Resolver II

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.