How to conditional merge tables in Power Query

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

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

  • @cristian.angyal
    @cristian.angyal 3 ปีที่แล้ว +23

    Hello Ruth and Thank You for everything you do for the community! The technique you've shown with a custom function is great but it's not very useful on larger data sources. I've tested both (Merge and Custom Function) solutions and actually measured the refresh times on Data Sources 10x and 100x bigger than the original source and it seems that on larger data sources the Merge solution is actually waaaaay better (over 90 x better) than the custom function. I've also tried buffering the pricing table inside the function and it was better than without it ... but still the merge option using UI is the CLEAR WINNER

    • @CurbalEN
      @CurbalEN  3 ปีที่แล้ว +2

      Thanks for taking the time to test this!
      In both cases PQ needs to iterate through both tables, but I expected it to perform in similar way?
      Now we know!!

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

      How to merge based on a key column and a date range?
      I did try the Table.SelectRows() method and it worked but the refresh is taking forever.

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

      Thank you for showing me this! It enabled me to do the conditional join without actually merging the two full tables.
      However, I was trying to find a method which could do it faster than the merge (and filtering afterwards), but as Cristian mentions, it is way slower indeed.
      This custom function is a cool technique, but unfortunately not useful in my case.

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

      What us UI? I tried to apply this custom function and it taking me forever to load. I have two criteria, name and timestamp. Please suggest other way to merge my table. thanks in advance.

    • @cristian.angyal
      @cristian.angyal ปีที่แล้ว

      Hi @@kelvinalmarez5495. UI stands for User Interface

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

    I am always so excited when Ruth says "for this - i am going to build a function"

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

      😂😂

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

    Glad that you are feeling better now! Thank you for sharing the technique!
    Btw, I was watching the Guy-In-A-Cube live cast this past weekend, and I saw that the community wants you on the show to discuss PQ and M! It would be a blockbuster!! I hope this happens!! 🤞

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

      Hi Hachi, what a weekend that was! 🤢
      For M I would choose Imke or Miguel Escobar, they are amazing!!

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

    Good tip. Merging larger tables in Power Query takes ages. However I'd rather make a custom column in both tables and set a relationship in PBI.

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

    Thanks, Ruth. I love all your training videos, I really have learned so much from you. 😊

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

      💛💛💛

  • @AlvaroPerez-ox7ul
    @AlvaroPerez-ox7ul 3 ปีที่แล้ว

    Woman you rule these issues. What a great teacher too!

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

      Man, glad to 👂

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

    Thank Ruth, for showing us new methods and techniques

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

      As soon as I learn something....so do you ;)

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

      @@CurbalEN Yah me too

  • @AlvaroPerez-ox7ul
    @AlvaroPerez-ox7ul 3 ปีที่แล้ว

    You are such a charming teacher when you giggle I giggle too LMAO

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

    Genial, me ayudaste a resolver un problema. Muchas gracias y un saludo grande desde Argentina!

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

      Un placer y saludos!!

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

    Thanks Ruth, But I have a scenario where I have to merge two tables , whatever is not matched in the first table I need to match it for next set of condition with the same second table .. Like this I have to continuously check and merge the two tables for 5 different set of conditions and finally give output of all that matched in either of the condition with color formatting for each set of conditions and also not matched at all at the end ..(Left outer join) .. eg.. first merge with addr1 .. for the unmatched rows of first set, match with addr2 .. for the unmatched rows of the previous set match for city, for the unmatched rows of the previous set match for state, for the unmatched rows of the previous set match for ZIP.. The two tables that are merged are around 100,000 rows each ..
    Help me please..

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

    Are you the founder of those formulas???

  • @bettina.e-k
    @bettina.e-k 3 ปีที่แล้ว +2

    Thank you Ruth, this video also doubles up as a great intro to functions! Glad you are feeling better.

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

    Hi, what happens if we got two variables?

  • @sajalsinghal8846
    @sajalsinghal8846 4 หลายเดือนก่อน

    how to merge many to many data

  • @Luftschlange123
    @Luftschlange123 11 หลายเดือนก่อน

    thank you

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

    Nice video
    looking the source file for practice.

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

      I Uploaded it to community downloads in the download center. It is download number 67.

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

      @@CurbalEN got it thanks . Excellent. Well explained.

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

    Fantastic!!!

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

    You may want to Table.Buffer before this step if your data is not 10 rows. Cool technique tho.

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

      Will do :)

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

    Nice! 👍😘

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

    🤯
    Do you have any cool video about custom function? Never used it and well...

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

      Like this one:
      m.th-cam.com/video/Ar_fV_oXSNs/w-d-xo.html
      I have others, just search the channel:)

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

    IS it really happens things out of the screen or behind the instructor? It could be I am too newbie, but this is really annoying into a training video.

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

      My editing skills are not always the best :(

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

      @@CurbalEN Thank you for the answer. I appreciate it. As I tried to mention that if I am new I need each of the little fragment of the information.

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

      Totally understand!

  • @leogaussbell1622
    @leogaussbell1622 8 หลายเดือนก่อน

    I didnt understand a thing

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

    Thanks for sharing this experiment with us, Ruth! I think for me, the approach I would take is first normalise the date format in both tables using Date.FromText and wrapping it with Number.From to get the date ID from both tables. Then I perform a merge.
    But of course, this is a hypothetical situation where Date.FromText would be able to read the two different formats in both Usage and Price tables. Otherwise, I would have to resort to splitting the year, day, and month using Text.Middle and concatenate them back and inferring the data type as type date.
    Apart from this, I suppose this idea can be used in other scenarios, which I just haven't thought of yet at the moment. I will definitely share with you once I come across that situation. Thanks again, Ruth!

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

      Looking forward to it!

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

    I HAVE 100,s of tables in source how do i combine those(excel read data from pdf and each page had a table) in power qe

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

    This is super helpful! I've been able to take away a lot from your other videos as well. I'm using this to build hierarchy structure for a chart of accounts. My current plan is invoking the formula for each layer in the hierarchy. It's working really well, but on a smaller set of data. I'll try researching table buffering or other best practice to optimize performance. Any tips would be helpful!

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

      If you need buffer, then you probably should do this at the source. Buffering will only take you so far …

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

    A new subscriber here. Thank you for your contribution. I have a looong way to go (this video was way above my current skillset) but I'm looking forward to learning from you.

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

      Yes, it was a bit advanced, but try the steps anyway. It helps to understand when you do it yourself.
      Welcome!!

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

    super

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

    jajaja no sé qué es lo mejor del video : lo divertido (qué lío con menor o mayor ) o las funciones tan prácticas... anyhow.... muchas gracias !!!!

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

      😂😂 Glad you enjoyed it!

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

    Primero que nada espero te mejores de salud y tomes tus medicinas; segundo: es una estupenda solución con la función invocada. Gracias y al pendiente de ti.

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

      Muchas gracias Jose Manuel, por todo!

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

    You are awesome! Definetly. Thanks sooo much!

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

    Thanks for that great tip!

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

      My pleasure!!

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

    What is she saying ?