No video

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

  Рет қаралды 38,150

SQLBI

SQLBI

2 жыл бұрын

There are two options to model many-to-many relationships using Tabular and Power BI: you can use either a regular bidirectional filter relationship, or a limited unidirectional relationship. In this video, we compare the performance of both options.
Article and download: www.sqlbi.com/...
How to learn DAX: www.sqlbi.com/...
The definitive guide to DAX: www.sqlbi.com/...

Пікірлер: 33
@danielmudie605
@danielmudie605 Жыл бұрын
"The kind of explanation where you just say yes because you want it to stop" you crack me up Alberto 😅 Also, super useful overview!
@cpcdev
@cpcdev Жыл бұрын
Your videos are really high quality. Crystal clear and I appreciate no ads.
@henrifanda4784
@henrifanda4784 2 жыл бұрын
Listening to your tutorial just brightened my day. Thanks for always sharing your knowledge through hands on practical. You are the best.
@bradj229
@bradj229 7 ай бұрын
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 :)
@gabinnanda1590
@gabinnanda1590 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 2 жыл бұрын
Alberto, great insight once again regarding the model construction and relations. 👍
@mohammadbakhshigohar1820
@mohammadbakhshigohar1820 Жыл бұрын
Your Brilliant Videos have taken my sleep 😍😍
@Obizzy8
@Obizzy8 2 жыл бұрын
Excellent walkthrough, thanks!
@wilsonman8661
@wilsonman8661 5 ай бұрын
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? 🤔
@Mirminman
@Mirminman Жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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.
@sniprick
@sniprick 2 жыл бұрын
Fascinating. Thank you!
@toniskolik5807
@toniskolik5807 2 жыл бұрын
Wao... awesome... This knowledge in terms of tabular models is also taught in your Tabular Course right?
@SQLBI
@SQLBI 2 жыл бұрын
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/
@laurentmarc1928
@laurentmarc1928 2 жыл бұрын
Really impressive !
@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.
@pedrosanteloy
@pedrosanteloy 2 жыл бұрын
Great video! What if we merge Sports to Customers and work with Many to Many relationships from Customers and Sales?
@pbihari0214
@pbihari0214 2 жыл бұрын
Thank you
@Rehan-os5ui
@Rehan-os5ui 2 жыл бұрын
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.
@HenrikGronwall
@HenrikGronwall 2 жыл бұрын
hahaha "the kind of explanation you just want to stop"🤣
@tommynguyen4253
@tommynguyen4253 2 жыл бұрын
How about if I denormalize the sport and customer table, then create M2M to sales? In my experience, it performs quite okay.
@zchase6631
@zchase6631 2 жыл бұрын
something out of the box, is there a way to model the relationship depends on the filters.
@michaelsanchez1518
@michaelsanchez1518 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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.
@mabl4367
@mabl4367 2 жыл бұрын
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 2 жыл бұрын
Connection is made by customer keys, so it's not a problem
@mabl4367
@mabl4367 2 жыл бұрын
@@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
@arameshkumar5072
@arameshkumar5072 2 жыл бұрын
* to * relationship have many drawbacks and some performance issues out there ?
@MrMalorian
@MrMalorian 2 жыл бұрын
I have always been too scared to try a many to many
Bidirectional relationships and ambiguity
14:02
SQLBI
Рет қаралды 102 М.
When to use KEEPFILTERS over iterators
18:56
SQLBI
Рет қаралды 47 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 31 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 49 МЛН
Я не голоден
01:00
К-Media
Рет қаралды 10 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 13 МЛН
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 51 М.
Microsoft Power BI: The Do’s and Don’ts of Power BI Relationships - BRK3019
1:00:42
Handling MULTIPLE fact tables in Power BI
9:02
Guy in a Cube
Рет қаралды 304 М.
Manage Many to Many Relationships in Power Pivot
17:27
Paula's Web3 & Crypto
Рет қаралды 171 М.
How to Correctly Define Many-To-Many Relationships in Database Design
7:07
Many to many issues and alternatives in Power BI
19:57
David Benaim
Рет қаралды 12 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 31 МЛН