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

View all the Fabric Data Days sessions on demand. View schedule

Reply

Calculate difference from Previous month dates in Power BI

Hello,

Am looking for some help to understand how to calculate the previous month difference from the data set below:  

For 3/1/2024  Prev Mth Diff but from 4/1/2024 the previous month difference is calculated based on the Net cost from previous month. I tried different DAX formulas and it resulted in 0 as the value for "Prev Mnth Diff". Need help!!

Thanks in advance.

AarthySivaramak_0-1739913490587.png

 

5 REPLIES 5

 

 

 3/1/2024 4/1/2024 5/1/2024 6/1/2024  
 Net CostPrev Mth DiffNet CostPrev Mth DiffNet CostPrev Mth DiffNet CostPrev Mth Diff 
REPORT         
TEST1$298 $301$3$301$0$200$101 

Thank you all for your response. But I think , I should be more specific on my question. I need the diff in cost from the current as well as previous month. Please find the sample data below: I have only NET COST and month field in my report and i need to figure the previous month diff from the date provided. 

For some reason, it doesn't allow me to paste the sample data along with replies. so am sending them separately.

My example shows how to get the previous months' value of Total Revenue. You can just get the difference between Total Revenue and the previous month's Total Revenue.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

Hi @AarthySivaramak 

 

Make sure you're using a separate dates table that's been marked as such https://www.sqlbi.com/articles/mark-as-date-table/ 

Create this measure:

Total Revenue Prev Month =
CALCULATE ( [Total Revenue], PREVIOUSMONTH ( Dates[Date] ) )

danextian_0-1739934668626.png

Please see the attached sample pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors