How To Remove Duplicate Rows In Power Query Based On Conditions

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • In this video, you will see how to clean up transactional data in Power Query, including a hack to generate M code for multiple nested table transformations by just using the User Interface and a method for creating a Running Total in Power Query.
    ****Video Details****
    0:34 three scenarios formulated
    1:44 adding column with absolute quantities
    2:10 group by ID index and absolute quantity
    2:30 add a new column - sum of the quantity
    2:47 add aggregation - AllRows
    3:27 add custom column for nested table transformations
    4:22 build transformation - add new query
    4:38 sort on movement type
    4:57 sort posting date
    5:15 List.FirstN function
    6:15 add index column
    6:34 custom column - running total
    8:24 add filter condition
    8:32 remove helper columns
    8:47 advanced editor
    **** Learning Power BI? ****
    FREE COURSE - Ultimate Beginners Guide To Power BI - portal.enterpri...
    FREE COURSE - Ultimate Beginners Guide To DAX - portal.enterpri...
    FREE - Power BI Resources - enterprisedna.c...
    FREE - 60 Page DAX Reference Guide Download - enterprisedna....
    Enterprise DNA Membership - enterprisedna....
    Enterprise DNA Online - portal.enterpri...
    Enterprise DNA Events - enterprisedna....

ความคิดเห็น • 38

  • @rauljimenez5485
    @rauljimenez5485 4 ปีที่แล้ว +5

    This is an amazing use of transformation within nested tables. The use of "insert as new query" and then copying the M is so simple yet powerful (I raise my hand and admit I never thought of that!!). Thank you very much, I thought I was all that and a bag of chips by doing transformations within the nested table (i would do "fake" steps and copy the steps into the Notebook, alter then ....)

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Raul Jimenez, great that you found value in this video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @leleca
    @leleca ปีที่แล้ว +1

    Amazing Job and teaching, thank you for that! Just a reminder: If you're doing this on your on way, always check the last step before do your custon column "Running Total", because it may led you to this error: "Expression.Error: A cyclic reference was encountered during evaluation". Using de example of the video, minute 7:25, custom column is "List.FirstN ( #"Added Index"[Qty], [Index]). After that, if you add any steps between Added Index and Custom Column, you HAVE to change the code of the custom column. It may seem clear right now as i'm explaining, but often times we make this mistakes.

    • @EnterpriseDNA
      @EnterpriseDNA  ปีที่แล้ว +1

      Hi Leandro, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI and Power Platform video tutorials and announcements. Cheers!

  • @EnterpriseDNA
    @EnterpriseDNA  4 ปีที่แล้ว +2

    Well done Melissa, great techniques showcased here

    • @JoshuaDHarvey
      @JoshuaDHarvey 4 ปีที่แล้ว +2

      More power query videos please! I know Sam does a lot of DAX and we love those videos but PQ is a great supplemental workflow for the pre-modeling stage where you don’t want to use TSQL.

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Joshua Harvey, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @EnterpriseDNA
    @EnterpriseDNA  3 ปีที่แล้ว +1

    You're a magician Melissa!

  • @achalbarla120
    @achalbarla120 3 ปีที่แล้ว +1

    Amazing!!! Thanks very much I`ve been looking for same solution...

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hi Achal Barla, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @EricaDyson
    @EricaDyson 4 ปีที่แล้ว

    Excellent. Need to watch it again Feel sure I will need to use this routine. Great. Thanks so much,

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Erica Dyson, great that you found value in this video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @darrengodkin
    @darrengodkin 4 ปีที่แล้ว

    Amazing stuff Melissa 👏
    thanks for sharing your great intuitive knowledge 👍

  • @mnowako
    @mnowako 4 ปีที่แล้ว +1

    Amazing! Thanks Melissa!

  • @JoshuaDHarvey
    @JoshuaDHarvey 4 ปีที่แล้ว +1

    Interesting approach. You could have also set that up as a function based on a query parameter to have invoked against the original table’s custom column [AllRows] nested tables especially if you needed to use that across multiple tables where you didn’t want to union them first

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Joshua Harvey, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

    • @anthonypasslow1933
      @anthonypasslow1933 2 ปีที่แล้ว

      I agree with the custom function, like you said. It came to mind as soon as i saw that nested let. I would think it easier to manage and see what is happening in the transformation process especially after time has passed and you need to make a modification

  • @anthonypasslow1933
    @anthonypasslow1933 2 ปีที่แล้ว +1

    Very informative and clever.

    • @EnterpriseDNA
      @EnterpriseDNA  2 ปีที่แล้ว

      Hi Anthony, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI video tutorials and announcements. Cheers!

  • @EricaDyson
    @EricaDyson 4 ปีที่แล้ว

    םOh but I am already.. and you've been a big help to me and continue to be so!

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Erica Dyson, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @saikirankusumanchi4522
    @saikirankusumanchi4522 3 ปีที่แล้ว

    This is really good technique.

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hi Sai kiran Kusumanchi, great that you found value in this video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @ITSNev
    @ITSNev 4 ปีที่แล้ว

    Very good Melissa

  • @user-li7mq5hp9g
    @user-li7mq5hp9g 4 ปีที่แล้ว

    Great tutorial thank you!

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Συμεών Παπαδόπουλος, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @jhormangomez2268
    @jhormangomez2268 3 ปีที่แล้ว +1

    Genius

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hi Jhorman Gomez, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @armanazote6230
    @armanazote6230 2 ปีที่แล้ว +1

    I am trying to remove duplicate base on serial numbers. My problem is that the field that are our agents filled out is free txt and sometimes put special characters for Non-Serial products.
    how can I treat special characters as unique versus products that have 15 digit serial numbers. special characters are not limited to (No value, *, -, ).? thanks.

    • @EnterpriseDNA
      @EnterpriseDNA  2 ปีที่แล้ว

      Hi arman,
      Thank you for posting your query onto our channel. We really appreciate you taking your valuable time to post it.
      Well it's always a little bit difficult to judge and provide the results without looking at the data structure, model and working of the PBIX file for the reference.
      And therefore we encourage you to please write back to us onto our Community Forum by providing the proper description of the problem that you're facing along with the PBIX file for the reference as well as the mock-up results that you're trying to achieve where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference.
      Hoping you find this useful! You can subscribe to our TH-cam channel so that you won't miss out on any Power BI updates. You can also join our LinkedIn group to receive latest updates on Power BI.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/

  • @pablomoreno9688
    @pablomoreno9688 2 ปีที่แล้ว

    I have a Query that has a daily version of the operation’s summary. This Query has a column with the date of the file’s creation and I want to keep the lastest version of the last date of each month. Could you save my life?

    • @EnterpriseDNA
      @EnterpriseDNA  ปีที่แล้ว

      Hello Pablo Moreno,
      Thank you for posting your query onto our channel. We really appreciate you taking your valuable time to post it.
      Well it's always a little bit difficult to judge and provide the results without looking at the data structure, model and working of the PBIX file for the reference.
      And therefore we encourage you to please write back to us onto our Community Forum by providing the proper description of the problem that you're facing along with the PBIX file for the reference as well as the mock-up results that you're trying to achieve where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference.
      Hoping you find this useful! You can subscribe to our TH-cam channel so that you won't miss out on any Power BI updates. You can also join our LinkedIn group to receive latest updates on Power BI.
      Cheers,
      Enterprise DNA
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/

  • @PedroCabraldaCamara
    @PedroCabraldaCamara 3 ปีที่แล้ว

    amazing!!!

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว +1

      Hi Pedro Cabral da Camara, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @chamelion100
    @chamelion100 4 ปีที่แล้ว

    Thanks 👍

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Manish Sawant, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @TheCraigie007
    @TheCraigie007 4 ปีที่แล้ว

    Awesome Melissa! Thanks.

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hi Craig Tysall, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html