Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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.
3/1/2024 | 4/1/2024 | 5/1/2024 | 6/1/2024 | ||||||
Net Cost | Prev Mth Diff | Net Cost | Prev Mth Diff | Net Cost | Prev Mth Diff | Net Cost | Prev 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.
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] ) )
Please see the attached sample pbix.
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...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.