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
Joshi_M
Helper I
Helper I

Measure for -Forward Stock Cover days

Hi,

I have been struggling to create a measure for calculation for Future stock coverage days.Below is a example of Matrix visual in Power BI.

Measure already created for Opening Stock,Demand , Receipts &  Closing Stock .

Opening stock = 

SUMX(
FILTER(ALLEXCEPT(ZBE_12WEEK_DEMAND_AP,ZBE_12WEEK_DEMAND_AP[Plant Text],ZBE_12WEEK_DEMAND_AP[Material Group Family],ZBE_12WEEK_DEMAND_AP[Material]),ZBE_12WEEK_DEMAND_AP[Index weeks]>=0 && ZBE_12WEEK_DEMAND_AP[Index weeks]<=MAX(ZBE_12WEEK_DEMAND_AP[Index weeks])-1),
[Act Stock])

Constraints as below

  1. Some slicers are already selected
  2. Year and week in text format
  3. Field available in Direct query in date format is (First day of the week)
  4. Fiels available for index weeks which is filtered for avlues between 0 &11

I want to use a measure to calculate the stock cover days  based on future demand

Kindly help  in creating a measure for Stock cover Days .

Example - Stock cover days for week 2021.06 = 14 ( closing stock = 20 , Demand =20 happens next 2 weeks hence 14)

 

Year /week2021.062021.072021.082021.092021.12021.112021.122021.132021.14
Material         
Material A         
Opening Stock 2020202020202020
Demand 400203001040030
Receipts 20 202020   
Closing Stock20402010304000-30
Stock Cover Days14.011.74.714.010.5    

Kindly respond Let me know if anything else is required.

Regards

Joshi M

2 REPLIES 2

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