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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JHOLT
New Member

return a filtered value according to month

I want to calculate days of stock based on actual monthly stock data and monthly forecast consumption.

I have calculated this as a running total, where days of stock = number of days for Forecast to be greater than current stock.

Each month there is a new "version" of the forecast data added in the same Database. Currently my model allows me to filter the 'version' of the forecast, and the days of stock updates accordingly

 

I want to be able to fix the 'version' of the forecast to specific months, so that historical data does not change

 

e.g. 

 

if Month = Jan, calculate days of stock considering forecast version 6th Feb, 

If month = Feb, calculate days of stock considering forecast version 29th Feb,

if month = March, calculate days of stock considering 26th March forecast, and so on

 

There is not a set rule of +1 month for the forecast, it is simply the version closest to the closure of the month, so I need to be able to define the specific filtered value for each month of stock

 

 

3 REPLIES 3
Greg_Deckler
Super User
Super User

Maybe Days of Supply? https://community.powerbi.com/t5/Quick-Measures-Gallery/Days-of-Supply/m-p/635656#M318

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

It is in essence the same calculation, I was able to make this work in a different way (e.g. after how many days will my forecast be greater than my inventory)

 

The problem I have is that each month there is a new version of the forecast, and I don't want previous months to update with the new data

 

I can change the version of the forecast as a filter, but this will change all months. Instead, i want to 'pin' a version of the forecast to each specific month. I hope this clarifies

Can you share sample data and sample output.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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