Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I am struggling to create a function that will add and subtract multiple columns in 1 line, and use the first Line's SOH as opening balance, subtract Consumption and add Incoming orders.Next line's opening balance is the previous line's closing balance. All data is in 1 table, but needs to do this till it reaches a certain number (31 - days) for all 3 products (X,Y and Z)
Closing Balance (n) = SOH - Consumption + Incoming Orders
Opening Balance (n+1) = SOH - Consumption + Incoming Orders
When testing this using sample numbers it works, but when trying to add solve the function and replace it with the data in the table, i get an error stating "Formula.Firewall: Query 'Dates' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.". Is there anyone that can try to assist or shed some light on what I am doing incorrectly. Very new to working with Functions in Power Query.
Many Thanks.
Regards
= List.Generate( () =>
[Day= 1 , SOH = MySOH, Consumption = MyConsumption, IncomingOrders= MyIncomingOrders ],
each [Day] <= #"Counted Rows",
each [Day = [Day]+1 ,Consumption = [Consumption], IncomingOrders = [IncomingOrders], SOH= [SOH]-[Consumption]+[IncomingOrders]],
each [SOH]) - My current code for List.Generate if this will help...