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.
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...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.