The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I'm looking for a m code solution that subtracts running totals and re-iterates calculation when a new FG Item is found, also to return last value from iteration to the beginning row
NewStep=Table.FromRecords(List.Accumulate(Table.ToRecords(PreviousStepName),{{},[]},(x,y)=>let a=Record.FieldOrDefault(x{1},y[FG_Item],y[#"RM#QTY in WHS"]),b=a-y[#"RM Part# Monthly Consumtion"] in {x{0}&{y&[Remaining Qty=b]},x{1}&Record.AddField(y[FG_Item],b)}){0})
Unfortunateley I am getting errors.
First one related to the null value converting to text
then if I am filling up FG_Item colunm to replce nulls i am getting another error that record wasn't found..
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.