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...

КОМЕНТАРІ • 19

  • @boissierepascal5755
    @boissierepascal5755 8 місяців тому +5

    Hi From France ! This is the best explanation I've ever seen. You made me understand List.Accumulate... At least ! Thanks a lot🙏🙏🙏

  • @larmondoflairallen4705
    @larmondoflairallen4705 8 місяців тому +2

    List.Accumulate is like the PQ problem child (along with Table.Buffer), but that was a darn good explanation.

    • @basensei8699
      @basensei8699  7 місяців тому

      glorious! thank you! yes these are always a bit tricky to explain!

    • @GeertDelmulle
      @GeertDelmulle 7 місяців тому +1

      What are you talking about?
      Not a problem child at all, just a very cool (fixed scope) iterator with a State variable.

  • @gabrielegrano8204
    @gabrielegrano8204 7 місяців тому

    Great! Well done and clearly explained!!

  • @Bhaskar_Joshi_there
    @Bhaskar_Joshi_there 7 місяців тому +1

    List.Accumulate is G:O.A.T 🐐

  • @danielgoncalveslima9350
    @danielgoncalveslima9350 8 місяців тому +2

    List.accumulate is sinister!!
    Sinistra!!
    Obrigado

  • @arnaudallard3663
    @arnaudallard3663 7 місяців тому

    It's simply wonderful !

  • @GeertDelmulle
    @GeertDelmulle 7 місяців тому +1

    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.

  • @rrrraaaacccc80
    @rrrraaaacccc80 6 місяців тому

    💯👍

  • @DirkFrazier
    @DirkFrazier 8 місяців тому +1

    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!

    • @basensei8699
      @basensei8699  7 місяців тому

      yes indeed it did update! i should have probably showed that a bit more in the video! thank you Dirk!

  • @mdhruv1
    @mdhruv1 3 місяці тому

    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

  • @ianl1052
    @ianl1052 7 місяців тому

    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?