Conditional JOIN using Power Query | A different way of merging in Power BI

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

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

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

    Looks like I may have to watch this a couple of times

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

      aaah that's where all the views are coming from 😀😉😁 ... thx Paul

  • @vgriga9682
    @vgriga9682 3 หลายเดือนก่อน

    Exceptionally presented in bite-size steps! Maybe, it would be better to start the video with demonstration of the downsides of the fuzzy merge that was done at the end of the video, that would set the context for the lesson. However, I knew what I was looking for and this technique absolutely saved my day! Thank you so much!

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

    You're a genius! Love this List function. Much better than using the interface of multi-step merge.

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

      thank you so much! Learning a bit of M opens a whole new world of possibilities 😄

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

    Brilliant! Your teaching style is excellent, clear and concise.

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

    Bas, this is phenomenal! I've been wondering for quite some time if there was a way to do a conditional merge in PQ. I do most of my transformations before bringing my data into PQ, but I was still curious if it was even possible. Your videos are like gold! I love your work - I follow a lot of Power BI channels, and I think your approaches are some of the most creative of anyone that I've seen. I personally would prefer if you removed the music from your videos, as I find it to be distracting from your brilliant content, but you and Chandeep of Goodly fame are easily my first stops if I'm looking for an out-of-the-box approach to a problem.

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

      thank you Nathaniel! that's really nice to hear 😀

  • @eFilet-O-Fish
    @eFilet-O-Fish ปีที่แล้ว +1

    For a more precise result return, simply merge the two tables upon selecting the merge toggle and utilize, "Inner Join" instead of "Left Join" for an exact match. To me, it seems to be more intuitive, and fewer steps involved. Love to hear your thoughts. (:

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

    excellent tip - Thanks!

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

      Glad it was helpful! thanks for the support!

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

    Thank you so much! Each video you make is so useful!!

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

    This is the coolest trick I've learnt this week!! Super amazing content...Thank you for sharing☺

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

      Glad you liked it Bryan!

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

    Very cool. I've always had a problem with the Power Query Merge for large datasets since PBI takes so long to evaluate the results. Does this offer any performance improvements?

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

      will check! although i don't think so... will let you know in one of the upcoming videos

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

    Bas is always Boss with his methods

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

    Impressive! I had no idea you could do such a thing!

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

      nice to hear David! It can come in very handy as you can adjust the join condition as you like 🙂

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

    how is the conditional join performance wise? when comparing with merge option? which one faster

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

    Test to Columns option would be easy for getting the vendors I guess. However, I learned something today. Thanks man!

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

      Text to columns, wouldn't return what you want here

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

    Would you know how to do a merge only getting the data that has the highest value of date in a column?

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

    What happens if more than 1 item on the list is present in the description?
    Can we control that behavior?

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

    ¡Gracias!

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

      thank you so much José for supporting the channel!!! 😀

  • @MyAvn
    @MyAvn 2 วันที่ผ่านมา

    Thanks

    • @HowtoPowerBI
      @HowtoPowerBI  2 วันที่ผ่านมา

      thanks so much for supporting the channel!!! really appreciate it :)

  • @SSi-nq3rt
    @SSi-nq3rt หลายเดือนก่อน

    Great content, now my question is, up to what size would those two options make sense? would that also work if one table has for example 30000 rows and the other one 1000 or are those solutions more for smaller tables?

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

    Ey Buz. Great video. Love all of them.

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

      thank you so much Rafael! Happy to hear you like them 😀

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

    Thanks for this. This gets me a bit farther down my road. I am trying to generate a column that will refer to a second table that will evaluate a date range and return a value from that table.

  • @davidcarr7793
    @davidcarr7793 7 หลายเดือนก่อน

    Can you do the same thing with a table instead of a list if you have more than one column you need to reference

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

    So great! Thanks a lot for showing this alternative!

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

      thanks for watching Lex!!!! 😀😊

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

    Peak TH-cam Entertainment!

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

    Really helpful, Thank you!

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

      awesome, happy to hear that! thx for watching 😀

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

    Great content, as always! Thanks for sharing Bas! 🔥

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

    good one! thx Bas

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

    performance wise, which one is better?

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

      i actually wanted to ask the same question :)

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

    Great technique. Watched it several times to understand. Thank you for creating this. I have a few questions? You said you don't want to load your list every time so you use List.Buffer. What does that do? Does it load one time, a few times, random times, not at all? Why did you add music to your videos? You're teaching complex content and the background music is distracting.

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

      Hopefully i can help. List.Buffer loads your table into PQ memory. That is to say, it wont load every time from the Source, it will read it from the query step. So it can technically improve performance. But with big big datasets, it may even hinder performance. One has to be strategic in where to execute the List.Buffer function.

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

      Thx for helping out Imran! 😀

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

      thx Joe! See explanation from Imran below. I will compare the performance with / without list.buffer in one of the upcoming videos

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

      Thank You sir! I am learnef a great deal from your content, I imagine you must be very busy replying to hundreds of comments! Thank you for your continued support!

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

    How did you create the variable vendor_info

  • @SudeepSwain02
    @SudeepSwain02 9 หลายเดือนก่อน

    You're amazing!!

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

    Thanks a ton Bas!!

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

    How both options impact performance?

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

      probably slower, but I'll still make a video on that 😉

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

      Yes, I was also wondering about performance. Really, I'm looking for something to improve the performance of merges. Cool video though. I can definitely see how this could be useful when wanting to merge in a particular way.

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

    great video thanks

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

    Pretty awesome vid, would you happen to have a video or a 'know how' to create a basket analysis using a conditional join? As such joining a table on itself with a not equal to operator so that when the same attribute (that we join on) is thrown into the view for comparability (in a matrix), we get a blank value for each value of a measure, where the same field is compared to, but all other comparitive fields show remaining distribution? if that makes sense? I can do this in under a minute in tableau, but in power bi, I am having difficulty.

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

    Amazing idea, never realized this technique. One question how does the performance compare to the 'regular' merge? And does this performance differ for example if you use a header/detail merge where you just merge on say the invoice number? Normally I use the detail table and then merge the header info I need onto it. Would using this method provide a quicker query step perhaps? Just trying to get a feel for this technique. (Also greetings from Amsterdam ;) geweldige videos)

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

      my guess would be that it is slower, but only one way to find out 🙃 .. I will check (and show it in one of the upcoming videos) .. dankjewel! groetjes 😀

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

    Great content, but just a bit of feedback - maybe have the Power BI area large on the screen and less of you, atm its 60/40 to you, would be better 70/30 to Power BI
    Still good to get the human touch - but want to focus more on what you're trying to do, and not just you.

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

      appreciate the feedback! will keep it in mind for the next ones

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

    great technique thank you

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

    Amazing Video!
    Where did you learn to do that??

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

      thanks Bryan!!! 😀 , I needed it once for a project so had to figure it out .. best way to learn

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

    Nice technique!

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

    amazing stufff Bas

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

    Great 👍. Can we do a conditional aggregation in the model?

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

      sounds doable, can you explain a bit more of what you are looking for

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

      @@HowtoPowerBI
      Great!
      Measures:
      Total Sales := SUM(Sales [Amount])
      This is a straightforward aggregation mapping, this hits the agg table.. whereas, requirement is
      Total Discounted Sales :=
      CALCULATE ([Total Sales], Sales[Discount] > 0)
      This fails to hit the agg table even if both amount and discount column is available and mapped in agg table.
      Hope this helps.

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

    Great!

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

    Its kinda good.... really hard to follow when you keep going backwards with your steps. Makes it hard to understand what exactly is going on. Especially when I can only see a snippet of what you are looking at. I struggled when you started going "vendor, vendor name" back a step "Vendors, vendor name, vendor" got to the point i had no clue where it came from. Idk if the list exists still. idk where it got its info from and most importantly, idk how to get the data i need into my table.

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

      Like... honestly extremley frustrating to know have a clue how you can still be using vendorname after you showed us you compiled it into a list. Obviously i missed something small but my data is different than yours therefore i cant do this exactly the way you did. Maybe has something to do with buffering i really dont know. Some of the shorter, more complex things like buffering, and putting a function in there, and "go to" whatever that is, all should come with some sort of explination of what its doing why you are using it and how i can understand it.

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

    Just a request please show complete screen for better understanding

  • @oladejiayodeji
    @oladejiayodeji 3 หลายเดือนก่อน

    Would be a lot more helpful if we see a bigger pane of the power BI query pane instead

    • @HowtoPowerBI
      @HowtoPowerBI  3 หลายเดือนก่อน

      Thx for the feedback

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

    Do you teach m query in detail

  • @ammarz.3654
    @ammarz.3654 3 ปีที่แล้ว

    Is there a way i can pay you for this video because you literally saved my life.

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

      no need to pay :) I am very happy it helped you! more, hopefully useful videos are coming !

    • @ammarz.3654
      @ammarz.3654 3 ปีที่แล้ว

      @@HowtoPowerBI Is it possible to have multiple columns when including text.contains

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

    Please show the entire query editor interface... I find this immensely confusing... Also, the pbix file doesn't open...

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

      I checked the download link / file. works fine for me .. what error do you get?

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

      @@HowtoPowerBI Many thanks for reverting... The error message says, "Could not find a part of the path 'C:\Users\basdo\OneDrive - Data Training eK\Desktop\conditional joins.xlsx'."

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

      @@ajieapen the excel file is also provided in the download . You can go to the source step and link it to that excel file

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

      @@HowtoPowerBI Ah.. alright... Thanks!

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

    I've a big challenge for you ;) I should do a dinamic Groupby for clusters of customers. I.e. I've 2 years, 2021 and 2020, I want do a count of customers that had invoiced more than 50k. However I want compare the same time frame and this is the big issue. For 2020 I've the entire year, for 2021 instead I've a dinamic time frame (for now June). How can I do a group by the selected months? If I want count how many customers have invoiced more than 50k and I keep (in the group by or summarize) the column "months", he checks each line for month & customer. For example if ANGELO has invoiced 10k on February and 40k on March he didn't count it since on a single month he didn't invoiced more than 50k but I want count it since the total is 50k! A stupid solution is to create as many groupings as many months for 2020 and 2021 but it is very annoying job.
    Do you have any different idea?
    Sorry for this long comment, I hope it is clear

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

      Hi Angelo, thx for the idea! will make a video on it how to solve it🙂

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

      @@HowtoPowerBI I love you man! I'm looking forward for your video.
      here there is a picture that showed what i want obtain, number of customers dived by different clusters. For this one i've done a group by customer, but i cannot keep month (otherwise he didn't summarize all invoices of the same customer) so i cannot make it dinamic with a month filter ibb.co/WywWxpj
      Further elements could be a group by products and months, and country and so on.

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

    Bas...you're a life safer..!

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

      Thanks Anush, happy i could help!

  • @walterstevens8676
    @walterstevens8676 3 หลายเดือนก่อน

    Id never realused that " each" was invoking a function...

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

    Thanks you so much, very helpful video for me