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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
symmo22
Frequent Visitor

Month on Month Error with sporadic data

HI, 

 

Would welcome some help with a formula i've been strugging to get right. I have a report pulling commodity data from various sources. As an example, USDA. I have a report guiding users to select a commodity showing price history, some smart narrative and key headlines such as MoM, QoQ, YoY. The latter just isn't right, however. I feel like it is due to the fact the pricing is monthly, and I just have a date field set to the first of the month, linked to a calendar table. I then have measures set up such as:

 

Value MoM% USDA =
VAR __PREV_MONTH = CALCULATE(SUM(COM_USDA[Value]), DATEADD('Calendar'[Date], -1, MONTH))
RETURN
    DIVIDE([Latest Price USDA] - __PREV_MONTH, __PREV_MONTH)
 
I suppose what I need is a formula that takes the last month's average (there is a lag to data so won't always be the current calendar month), and compare's it to one month/quarter/year prior. I just can't for the life of me figure it out. 
 
Appreciate any help! 
1 REPLY 1
symmo22
Frequent Visitor

For further detail, here's the desired output. As you can see from the chart - 11% is nowhere near correct. The measure is in a card with the 'top 1 latest date' filter added, and no interation with date slider. 

symmo22_0-1676538529314.png

I have another dataset from the IMF where it seems to work - not sure why this is any different. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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