Different options to model many to many relationships in Power BI and Tabular

Поділитися
Вставка
  • Опубліковано 9 січ 2025

КОМЕНТАРІ • 34

  • @bradj229
    @bradj229 Рік тому +2

    Great explanation and demonstration. Thank you. Also, thank you for being honest about how you handled hearing this option the 1st time. It shows even the Pros are taught something sometimes :)

  • @cpcdev
    @cpcdev Рік тому +4

    Your videos are really high quality. Crystal clear and I appreciate no ads.

  • @danielmudie605
    @danielmudie605 Рік тому +6

    "The kind of explanation where you just say yes because you want it to stop" you crack me up Alberto 😅 Also, super useful overview!

  • @henrifanda4784
    @henrifanda4784 3 роки тому +6

    Listening to your tutorial just brightened my day. Thanks for always sharing your knowledge through hands on practical. You are the best.

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

    Great explanation and demonstration. Thank you

  • @gabinnanda1590
    @gabinnanda1590 3 роки тому +2

    Thanks alot i really appreciate your explanations and we are impatient to see the next video on how to use both models with conditional statements.

  • @marcossaraiva4245
    @marcossaraiva4245 3 роки тому +1

    Alberto, great insight once again regarding the model construction and relations. 👍

  • @mohammadbakhshigohar1820
    @mohammadbakhshigohar1820 2 роки тому +1

    Your Brilliant Videos have taken my sleep 😍😍

  • @Obizzy8
    @Obizzy8 2 роки тому +1

    Excellent walkthrough, thanks!

  • @Mirminman
    @Mirminman Рік тому +2

    I have somes doubts. What happend when you have another dimension like a Calendar table in the second model (NEW) and the calendar table has a regular relation with Sales table?. Because we don't have a bidirectional filter (only we have a Many to Many relationship), what is the impact in the data when you filter in this way: Calendar table to get the sales for a year and then what is the value for Sports table or Customer table?
    Nice video!

  • @Bharath_PBI
    @Bharath_PBI 3 роки тому +1

    That's challenging for data modelers, who target the model for self service bi users. So we wouldn't know what user queries are. We always followed the canonical way, rather than trying the "New" method as to avoid bi directional relationship. Now if bi directional relationship can be leveraged (with proper considerations) then there could be scenarios where model becomes complex especially when there are multiple star schemas and conformed dimensions. But still could keep it as a choice for modeling. Thank you 👍

    • @SQLBI
      @SQLBI  3 роки тому

      Please not that in the original model the logical relationship between Sports and Customer is a single direction. The bidirectional filter in the bridge table is just an artifact to implement in a physical model a logical relationship. This is one of the few cases where the bidirectional filter is safe in the model, assuming you do not connect other relationships to the bridge table.

  • @wilsonman8661
    @wilsonman8661 10 місяців тому

    My comment was going to be similar to what was mentioned at the end. What if you add in an inactive relationship between customer and sales and use that one if you only want to filter by customer? 🤔

  • @pedrosanteloy
    @pedrosanteloy 3 роки тому +1

    Great video! What if we merge Sports to Customers and work with Many to Many relationships from Customers and Sales?

  • @sniprick
    @sniprick 3 роки тому +1

    Fascinating. Thank you!

  • @seanhorowitz8277
    @seanhorowitz8277 2 роки тому

    The new many to many option is very interesting and I can definitely see some solid opportunities for applying the concept - thank you!. I am slightly unclear of the utility provided by this particular use case, given that filtering sports using the Customer Key on the Sales table provides you with no indication of how much of your sales for any given customer is related to the relative sport(s) associated with that customer (without doing that via a product key or what not).

    • @SQLBI
      @SQLBI  2 роки тому

      Indeed, the many-to-many cardinality relationship can be used only when you don't have such information. If you have that additional data, you probably have another table and you create a many-to-many relationship with a bridge table and two one-to-many relationships.

  • @toniskolik5807
    @toniskolik5807 3 роки тому +3

    Wao... awesome... This knowledge in terms of tabular models is also taught in your Tabular Course right?

    • @SQLBI
      @SQLBI  3 роки тому +4

      Data modeling is not the core of that training, but we have a module about relationships in that course. Another useful training is Data Modeling for Power BI, where we cover more data modeling scenarios: www.sqlbi.com/training/data-modeling/

  • @Rehan-os5ui
    @Rehan-os5ui 3 роки тому

    Hello, Is there way to find whether a column is based on another column in power bi desktop or service ?
    Example- If database has two columns 'FirstName' and 'LastName'. They're concatenated to 'FullName'. Is there way to find in power bi that 'FullName' is made of two columns.

  • @tommynguyen4253
    @tommynguyen4253 3 роки тому

    How about if I denormalize the sport and customer table, then create M2M to sales? In my experience, it performs quite okay.

  • @zchase6631
    @zchase6631 3 роки тому

    something out of the box, is there a way to model the relationship depends on the filters.

  • @laurentmarc1928
    @laurentmarc1928 3 роки тому +1

    Really impressive !

  • @michaelsanchez1518
    @michaelsanchez1518 3 роки тому

    Is it possible to create a model using two customer tables one with the direct relationship and one with the new relationship you have introduced and use whichever is advantageous?

  • @victorarayal
    @victorarayal 3 роки тому

    Hi!
    About the alternative model, shouldn't we relate the bridge table with sales based on the calculated column (Customer key/ Sport key)and not based on just customer key? If not, if we create a report trying to show sales amount by sport the number would be wrong. Am I right or i am not seeing something important?

    • @sergiyrazumov5518
      @sergiyrazumov5518 3 роки тому

      hey, Victor. Think of Books sales where each Book has several Authors. If we want to see Sales by Books, we're ok. If we want to see sales by Authors, we hit M2M; same as Sports--> Sales here. If we could directly split Sales by Sport (i.e. having Sport key key in Sales tbl), that would not be M2M anymore.

  • @arameshkumar5072
    @arameshkumar5072 3 роки тому

    * to * relationship have many drawbacks and some performance issues out there ?

  • @HenrikGronwall
    @HenrikGronwall 3 роки тому +3

    hahaha "the kind of explanation you just want to stop"🤣

  • @pbihari0214
    @pbihari0214 3 роки тому +1

    Thank you

  • @MrMalorian
    @MrMalorian 3 роки тому +1

    I have always been too scared to try a many to many

  • @mabl4367
    @mabl4367 3 роки тому

    I haven't tested this but would not the new data model have problems with customers playing no sports?
    Customers playing no sport would have no connection to the sales table.
    Perhaps this could be fixed by adding a sport called "no sport" and one record for each customer, not already in the bridge table, to the bridge table connecting each such customer to this fake sport.

    • @natsarev
      @natsarev 3 роки тому

      Connection is made by customer keys, so it's not a problem

    • @mabl4367
      @mabl4367 3 роки тому

      @@natsarev I don't understand. If the customer plays no sport there would be no record for that customer in the bridge table and therefore no connection to the sales table in the new model.
      To prevent this we could add records to the bridge table for all customer keys and with a null value for the sport.

    • @joshash5944
      @joshash5944 2 роки тому

      That was my first thought too. When no sport is played, there is no way for a customer to filter sales. Their customer keys will not appear in the bridge table at all making a connection impossible