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
joshua1990
Post Prodigy
Post Prodigy

Running Total based on 2 Measures and 1 Calculated Column

Hi all!

I have 2 simple measures:

  • Stock Level 
  • Planned Orders

The first one shows me the Stock Level as of today. It is based on a inventory table that is linked to a calendar table with date = today.

Planned Orders is a measure that shows me for specific dates in the future the expected orders.

Then I have a attribute table that contains all articles. In the same table we have the forecast as a calculated column. It shows the expected forecast per week.

 

Now I would like to create a matrix that shows me the following information:

Year-Week Current Stock Level Forecast Orders Expected Stock Level
2022-44 7500 500 1500 8500
2022-45   500 0 8000
2022-46   500 0 7500
2022-47   500 150 8500
         
         

 

Now, how can I calculated the last column?

It is based on Stock + Planned Orders - Forecast.

Can we use here the new DAX function OFFSET?

 

 

Thanks

 

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @joshua1990 

According to your needs, you first need to determine whether only the first row of your [Current Stock Level] has data, or do you need to judge according to the [Year-Week] field?

Second, if you want to implement mutual calculation of measures, you can use the SUMMARIZE()+ALLSELECTED() function to create a virtual table of the measures, and then calculate them in the virtual table.

For the accumulation calculation, you also need to have a column that can distinguish the corresponding time-size relationship.

For the accumulation calculation of the measure needs to be calculated in combination with the corresponding model, can you share your .pbix file (remove sensitive data) to us, so that we can better help you~

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

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.

Top Solution Authors