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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
William_Moreno
Helper II
Helper II

Balance Inventory table

Hi everyone,
I need help with this table below, I want to reproduce this in data columns and only with dax formulas, I can't use powerquery in this case. 

LocalPartNumberDateDemandOrdersTransferStrategy InvetoryOpenStockNeededRevised NeedCloseStock
Italy30397201/03/202108.00009.4200-1.4201.4209.420
Italy30397201/04/202110.4818.00009.4209.420-2.4812.4819.420
Italy30397201/05/202111.12612.00009.4209.4200010.294
Italy30397201/06/202111.490009.42010.294-10.61610.6169.420
Italy30397201/07/202111.445009.4209.420-11.44511.4459.420
Italy30397201/08/202111.704009.4209.420-11.70411.7049.420
Italy30397201/09/202111.970009.4209.420-11.97011.9709.420
Italy30397201/10/202112.126009.4209.420-12.12612.1269.420
Italy30397201/11/202111.281009.4209.420-11.28111.2819.420
Italy30397201/12/202111.381009.4209.420-11.38111.3819.420

 

The red collors are formulas like theses:

OpenStock = CloseStock month before

Needed = IF(OpenStock + Orders – Demand-Transfer>Strategy,0,OpenStock + Orders – Demand-Transfer-Strategy)

Revised Need = Needed x (-1)
CloseStock = OpenStock + Orders – Demand-Transfer +Needed

 

I will be very grateful if anyone can help me

thanks in advanced

1 REPLY 1
Icey
Community Support
Community Support

Hi @William_Moreno ,

 

I'm afraid this is unachievable with DAX.

This row's value of Measure/Column 1 is based on previous row's value of Measure/Column 2, and This row's value of Measure/Column 2 is based on previous row's value of Measure/Column 2. This kind of calculation logic cannot be implemented with DAX.

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.