Power Query Excel | M CODE - Challenge Solutions with Table.Partition & List.Accumulate

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 29

  • @Sumanth1601
    @Sumanth1601 Год назад

    Excellent content as always 😃👍 table.partition was not aware of it..

    • @bsmart2gether408
      @bsmart2gether408  Год назад +1

      Table.Group is still the best common option. I can add this to the alternate option when Table.Group doesn't fit well to the solution.

  • @jhaanand81
    @jhaanand81 Год назад +1

    Thank you so much!!

  • @jhaanand81
    @jhaanand81 Год назад

    Wow superb!!!!

  • @jhaanand81
    @jhaanand81 Год назад

    Hi KT how can we sum a particular row using List.sum and show subtotal on top of column the way we do it in excel.

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      Hi anand, the most simplest way is to use the append table function to append the sum.

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      You can use this function as well.
      learn.microsoft.com/en-us/powerquery-m/table-aggregatetablecolumn

  • @anuurag6011
    @anuurag6011 Год назад

    I have a problem, when i import text file in power query office 2016, power query doesn't delimit some raws. How to solve this problem.

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      Hi @anuurag6011, It is not easy to explain it here as it could caused by various factor. Click on the link will take you the microsoft document about how to import csv/text. I hope it resolves your problem. Otherwise, please raise your problem in power bi community and I'll address it from there. learn.microsoft.com/en-us/power-query/connectors/text-csv

    • @anuurag6011
      @anuurag6011 Год назад

      @@bsmart2gether408 Thanks, I think it's power query version difference, because the dataset completely delimited in Office 2021, but in 2016 it's not.

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      @@anuurag6011 How is handle through various Excel can be slightly different as it improve overtime. However, some basic challenge like import csv/text can still be resolve through modifying the M code. If you have some sample data that you have challenge with. I am happy to look at it.

    • @anuurag6011
      @anuurag6011 Год назад

      Okay, how to share

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      The best is through Power Platform Community and tag Bsmart2gether. That'll would benefit the broader community.

  • @m.bouguerra
    @m.bouguerra Год назад

    Hi..
    suppose the invoice number is of this form "Qk-954420", how to solve this error (We cannot convert the value "Qk-954420" to type Number. Details: Value=Qk-954420 Type=[Type])

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      I assumed you referred to the table.partition solution. If you are dealing with text, the data must be in text format. Change the data type to text before you apply the table.partition function. I hope it helps.

    • @m.bouguerra
      @m.bouguerra Год назад

      @@bsmart2gether408 Hello.. It's not working... try yourself with a simple example and let's say that the key column used in Table.Partition is text... If it works with you you send me the example and the code ... thank you Moussa from Algeria

    • @bsmart2gether408
      @bsmart2gether408  Год назад +1

      @@m.bouguerra Please see attached link to the file. What I have updated is the data type in two steps. docs.google.com/spreadsheets/d/1bVWG02GK9y98YosebR6IMHKQzPL8L_HU/edit?usp=share_link&ouid=113026615372791522331&rtpof=true&sd=true

    • @m.bouguerra
      @m.bouguerra Год назад

      @@bsmart2gether408 Thanks buddy

  • @jhaanand81
    @jhaanand81 Год назад

    Hi KT could you elaborate a little and name the function

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      1. Table.AggregateTableColumn + List.Sum
      2. Table.Combine

    • @jhaanand81
      @jhaanand81 Год назад

      @@bsmart2gether408 Thank you I will try to use do cover this topic in your future videos

  • @DJPejsen
    @DJPejsen Год назад +1

    Thank you
    Have you tested this code with 100K+ rows?
    I believe you need to add List.Buffer or Table.Buffer to get a good performance

    • @bsmart2gether408
      @bsmart2gether408  Год назад

      Hi Jan, you're right. I didn't add the buffer function in this scenario. You'll need to use the buffer function if you constantly reference it, as it is stored in the memory for quick access to massive datasets. One thing to be mindful of when you use the buffer function is if you use 32-bit Excel. It can blow off the query if it doesn't get handled properly.