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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.