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
Cardi0z
Helper I
Helper I

need help to create measure Previous Month value

Dear All,

need help to create measure for showing data about Previous Month value.
today i am trying create measure below :

pa_prev_month =
CALCULATE(
            SUM(PA[tot_prod]),
            PREVIOUSMONTH(PA[date_k].[Date])
        )


but, i am getting issue that value of previous month not calculated correctly

Cardi0z_0-1723099851225.png


please help me

1 ACCEPTED SOLUTION
mickey64
Super User
Super User

For your reference.

Calculation = EXPANDALL(SUM([M_Prev Sum]),ROWS)

 

Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

 

mickey64_0-1723124561071.png

 

View solution in original post

2 REPLIES 2
mickey64
Super User
Super User

For your reference.

Calculation = EXPANDALL(SUM([M_Prev Sum]),ROWS)

 

Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

 

mickey64_0-1723124561071.png

 

Idrissshatila
Super User
Super User

Hello @Cardi0z ,

 

can you please explain why you're assuming the data is wrong, because in your screenshot the data looks matching for the previous month.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.