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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vishal_maverick
New Member

Need help: Cumulative movement based on measures; results are messed up!

Hi

I am trying to calculate the 6 months cumulative movement of inventory. Data comes from multiple transaction tables and each line you see is a measure.

vishal_maverick_1-1657614957437.png

 

I am giving below some key measures which are coming into play:

Expected Receipts = calculate(max([DOK Receipts],([Open PO]+[Incoming Transit])))

 

Expected Dispatches = calculate([Confirmed SO]+[Unconfirmed SO]+[Consignment TO],'Calendar'[Horizon]="Current Month")+CALCULATE(max([Forecast],([Confirmed SO]+[Unconfirmed SO]+[Consignment TO])),'Calendar'[Horizon]<>"Current Month")

 

Expected Consumption = calculate([OPS TO],'Calendar'[Horizon]="Current Month")+CALCULATE(max([OPS Consumption (Plan)],[OPS TO]),'Calendar'[Horizon]<>"Current Month")

 

Movement = [Expected Receipts]-[Expected Dispatches]-[Expected Consumption]

 

Cumulative Movement = calculate([Movement], FILTER(ALLSELECTED('Calendar'), 'Calendar'[Date]<=MAX('Calendar'[Date])))

 

Upto calculation of Movement per month, everything is fine. Cumulative Movement goes well upto first 2 months but then the problem begins. So far I could dignose that there is a certain pattern:

  • In the 3rd month, confirmed sales orders exceeded the forecast. so Expected dispatch is correctly calculated. But the cumulative movement formula did not consider it. It went by considering the forecast number. Therefore, cumulative number shows -40507, which should have been -72532. This gives error of 32025.
  • in the 4th month, DOK receipts are higher than the incoming transit+Open purchase orders. Expected receipts were calculated correctly. But the cumulative formula ignored that. It has gone ahead with the total of incoming transit + Open purchase orders, i.e., zero. Thus the cumulative movement shows -334261 instead of 130766. This is explained as a gap of 235520 (from the receipt side error of this month) + the 32025 error carried forward from the previous month... total cumulative error of 203495.

Can someone tell me what I am doing wrong?

2 REPLIES 2
v-cazheng-msft
Community Support
Community Support

Hi @vishal_maverick,

 

Could you please provide some sample data used in your measures and let me know how you build relationships for them if you still have problems on it? Thanks in advance!

 

Best Regards,

Community Support Team _ Caiyun

Thanks for the response. the problem is i am dealing with loads of transactional data and multiple relationships between the tables. I am unable to share the data. 

 

Considering all measures are working out well until calculation of monthly movement, i dont see a problem in those measures. It is only the final one.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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