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.
I have a table with the values below. On the left is the current state. On the right is where I need to get to. Effectively, I need to fill the "Bank Account" value on all records where the Batch ID is the same. If there is no Bank Account, nothing should happen. The catch for me is that the value could be on the first, last or any record in between so the fill is either up, down, or both up and down.
Appreciate any help or direction.
Thanks!!
Solved! Go to Solution.
NewStep=Table.Combine(Table.Group(PreviousStepName,{"Batch Index","Trans Index"},{"n",each let a=List.RemoveItems([Bank Account],{"",null}){0}? in Table.TransformColumns(_,{"Bank Account",each if _=null or _="" then a else _})},0,(x,y)=>Byte.From(x[Batch Index]<>y[Batch Index] or y[Trans Index]=1))[n])
This works PERFECTLY with the exception of transactions like the following (my apologies this scenario was not included in my original post):
Basically, only fill the null values if there are any.
Thank you again for your help!!
Best,
LloydW
NewStep=Table.Combine(Table.Group(PreviousStepName,{"Batch Index","Trans Index"},{"n",each let a=List.RemoveItems([Bank Account],{"",null}){0}? in Table.TransformColumns(_,{"Bank Account",each if _=null or _="" then a else _})},0,(x,y)=>Byte.From(x[Batch Index]<>y[Batch Index] or y[Trans Index]=1))[n])
Absolutely AMAZING!! Thank you soooooo much!!!
NewStep=Table.Combine(Table.Group(PreviousStepName,{"Batch Index","Trans Index"},{"n",each let a=List.RemoveItems([Bank Account],{"",null}){0}? in Table.TransformColumns(_,{"Bank Account",each a})},0,(x,y)=>Byte.From(x[Batch Index]<>y[Batch Index] or y[Trans Index]=1))[n])
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.