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
rachaelwalker
Resolver III
Resolver III

Grand Totals are not summing correctly for previous month

I am trying to create a measure or calculated column to sum the value for each previous month and to reflect the accurate total but my total is showing January's value and not the sum.

rachaelwalker_0-1710367059123.png

 

This is my measure. How can I get this to sum it correctly and filter just the previous month

50% Next Previous Month = 
CALCULATE (
    SUM ( 'Opportunities'[50% Next] ),
    PREVIOUSMONTH ( 'Calendar'[Date] )
)

 

1 ACCEPTED SOLUTION

Thank you for taking the time to help! With this being a forecast, I need it to return the previous month based on the selected date/fitler. I fixed it using the DAX below. I am still learning why to use certain functions and what the impact is. I have saved your measure for future use. Thank you!

 

50% Next Previous Month = 
CALCULATE (
    SUM ( 'Opportunities'[50% Next] ),
    DATEADD('Calendar'[Date],-1,MONTH)
)

 

View solution in original post

2 REPLIES 2
v-yanimei-msft
Community Support
Community Support

Hi @rachaelwalker , 

Thank you for reaching out with your issue regarding the calculation of totals for the previous month in Power BI. Based on the measure you've shared, it seems like you're on the right track with using and functions. Depending on your description, perhaps adjusting the measure will achieve the effect you want. Here's a slightly modified version of your measure that ensures the context is set correctly:

Next Previous Month = 
CALCULATE (
    SUM ( 'Opportunities'[50% Next] ),
    FILTER (
        ALL ( 'Calendar'[Date] ),
        'Calendar'[Date] > EOMONTH ( TODAY(), -2 ) && 'Calendar'[Date] <= EOMONTH ( TODAY(), -1 )
    )
)

You can adjust the date logic as needed to fit your scenario.

If you have any challenges or other issues implementing this solution, can you share the specific data ( including table and model ) you have used in text and image format? In addition to this, you also need to determine if there are any specific filters or slicers applied to the report, as this may affect this calculation. This will help diagnose the problem more effectively.

 

 

Best Regards,

Caroline Mei

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for taking the time to help! With this being a forecast, I need it to return the previous month based on the selected date/fitler. I fixed it using the DAX below. I am still learning why to use certain functions and what the impact is. I have saved your measure for future use. Thank you!

 

50% Next Previous Month = 
CALCULATE (
    SUM ( 'Opportunities'[50% Next] ),
    DATEADD('Calendar'[Date],-1,MONTH)
)

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.