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
JbBI
Regular Visitor

**Complex** MINX / FIFO calculation

Hi All,

 

Scope of problem

To give some context I am working on a Inventory first in first out problem (FIFO).

We have products that have a unique item number.
They also have a sku number which identifys what product they are.

From there we have a "treated" date this is essentially the day they come into stock.

We also have a "last date" this is the day they go out of stock.

 

What the below calculation is intended to do is work out when a item goes out of stock, how many were left over that were older.

Essentially trying to measure how good our FIFO is.

 

I need to add an extra step which is after the formulas below are run

 

Which works out the current treatment date and then works out the  minimum treatment date.

So current treatment date - mimimum treatment date = x and is this greater than fourteen, (2 weeks)

As if we draw down on stock and its within two weeks of the oldest inventory its not a big deal.

 

 

When i add a min formula it is calculating the min of the treatment date column which isnt within the same context of the steps in the formula before this.

 

JbBI_0-1660628627351.png

JbBI_1-1660628643347.png

 

 

 

 

1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @JbBI 

Thanks for reaching out to us.

>> When i add a min formula it is calculating the min of the treatment date column which isnt within the same context of the steps in the formula before this.

What is the filter context when you are calculating min

 

 

Best Regards,

Community Support Team _Tang

If this post helps, 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.