Power Query - Iteratively Add Calculated Columns 🦩🦖
Вставка
- Опубліковано 25 гру 2024
- A great use case for using the powerful m-query iterator function list.accumulate to dynamically add new calculated columns to a output dataset.
#dataanalytics #data #datatransformation #etl #excel #powerbi #powerquery
File Link
github.com/jbo...
Noteworthy techniques
Dynamically add columns
Functions used
List.Accumulate
powerquery.how...
Record.Field
powerquery.how...
List.Skip
powerquery.how...
Hi From France ! This is the best explanation I've ever seen. You made me understand List.Accumulate... At least ! Thanks a lot🙏🙏🙏
Glorious! thank you!
List.Accumulate is like the PQ problem child (along with Table.Buffer), but that was a darn good explanation.
glorious! thank you! yes these are always a bit tricky to explain!
What are you talking about?
Not a problem child at all, just a very cool (fixed scope) iterator with a State variable.
Great! Well done and clearly explained!!
List.Accumulate is G:O.A.T 🐐
definitly!
List.accumulate is sinister!!
Sinistra!!
Obrigado
excellent thank you!
It's simply wonderful !
Thank you! Cheers!
2:30 No, “current” (I just use “i”) is not the “current state of your variable”, it’s the loop variable that takes on every value in the list, provided in the first argument of List.Accumulate.
true!
💯👍
I didn't see your column A (total) update when you added column F (Stock James). It should, right? Regardless, I really liked your explanation of List.Accumulate! It's a tough one to wrap your head around and this made it easy to understand. Thanks!
yes indeed it did update! i should have probably showed that a bit more in the video! thank you Dirk!
I have a situation where I have a parent child relationship in a multiple rows. I need to do a market basket transform where I need to pivot the parent child into one row to see what combinations are selling . Any guidance how could I do that here
Help!!! I keep getting "Expression.SyntaxError: Token ')' expected." every time I type in "= list.accumulate(Source,1, (state, current),=> state * current)". [obviously without qutation marks and source being the original query >> = {1,2,3,4,5}] I don't know about anyone else, but I count 2*open brackets and 2*closed brackets. What am I missing? (Excel 365). Oh btw, are the spaces in the syntax necessary?