Power Query - Iteratively Add Calculated Columns 🦩🦖

Поділитися
Вставка
  • Опубліковано 29 кві 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/jbotes/powerbiTuto...
    Noteworthy techniques
    - Dynamically add columns
    Functions used
    List.Accumulate
    powerquery.how/list-accumulate/
    Record.Field
    powerquery.how/record-field/
    List.Skip
    powerquery.how/list-skip/

КОМЕНТАРІ • 18

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

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

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

    It's simply wonderful !

  • @rrrraaaacccc80
    @rrrraaaacccc80 Місяць тому

    💯👍

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

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

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

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

    • @GeertDelmulle
      @GeertDelmulle 3 місяці тому +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 3 місяці тому

    Great! Well done and clearly explained!!

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

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

  • @GeertDelmulle
    @GeertDelmulle 3 місяці тому +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.

  • @DirkFrazier
    @DirkFrazier 3 місяці тому +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  3 місяці тому

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

  • @ianl1052
    @ianl1052 2 місяці тому

    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?

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

    List.accumulate is sinister!!
    Sinistra!!
    Obrigado