Circular dependencies and relationships - Unplugged #55

  Рет қаралды 5,024

SQLBI

SQLBI

6 ай бұрын

Avoid circular dependencies when calculated columns or tables are involved in regular one-to-many relationships.
Related articles: www.sqlbi.com/articles/blank-... www.sqlbi.com/articles/expand...
Read more about the "unplugged" format: www.sqlbi.com/blog/marco/2021...
#unplugged

Пікірлер: 33
@tamerjuma
@tamerjuma 6 ай бұрын
So far this is the best explanation of circular dependency. Many thanks Marco for sharing your amazing knowledge. ❤
@VictorHugo-bd3bf
@VictorHugo-bd3bf 5 ай бұрын
This is gold. Thank you, Marco, for this fantastic explanation of the concept.
@joaoluismartins
@joaoluismartins 6 ай бұрын
This video is GOLD! Thanks for that SQLBI.
@sarajvo2010
@sarajvo2010 5 ай бұрын
Video is about expanded tables. Great video
@nishantkumar9570
@nishantkumar9570 5 ай бұрын
Thanks so much for the insightful explanation for this circular dependencies problems. Now, I have pretty clear idea about the problem and how to fix this. Thanks so much.
@businessinsights_AlexRobe
@businessinsights_AlexRobe 6 ай бұрын
Another GREAT concept and solution explanation Marco, thanks!
@pro1427
@pro1427 5 ай бұрын
omg you must have a crystal ball or something, faced this issue yesterday tryng to make a dimension table using UNION and VALUES functions (combining 2 direct query tables). Of course i faced the "circular dependecy" error, just replaced the VALUES for DISTINCT and solved the issue. Thank you very much master!!
@ihorkoropetskyi3234
@ihorkoropetskyi3234 6 ай бұрын
Very detailed explanation. Thanks
@marilenadonofrio9787
@marilenadonofrio9787 5 ай бұрын
You're amazing, Marco!
@ikar2k
@ikar2k 6 ай бұрын
Absolutely amazing! Bravissimo!👍👌
@joceirchaves316
@joceirchaves316 6 ай бұрын
Amazing explanation about circular dependencies!
@gustavobarbosa906
@gustavobarbosa906 6 ай бұрын
Very interesting, Marco! Thank you!
@kkaurkify
@kkaurkify 6 ай бұрын
Thank you Finally I got an explanation why I have had to redo the calculated column using the filter function and could not use the calculate function.
@mohammed333suliman
@mohammed333suliman 6 ай бұрын
Thank you, great explanation
@johnveliku
@johnveliku 6 ай бұрын
My God... I mean Marco Russo is my God :). Great infos!
@mabl4367
@mabl4367 6 ай бұрын
Great video!
@juliane1mota
@juliane1mota 4 ай бұрын
Thank you for the amazing video!!! Helped me so much! ❤
@mrbartuss1
@mrbartuss1 6 ай бұрын
This showed me how little I know...
@laionegan
@laionegan 5 ай бұрын
Thanks Marco.I don't understand when you say that calculate triggers context transition but we are creating a calculated column so there is no filter context, there is only a row context.so what remains in the context transition?anyway i have to review better that part with removefilters
@SQLBI
@SQLBI 5 ай бұрын
The row context becomes a filter context because of the context transition triggered by CALCULATE.
@coolblue5929
@coolblue5929 4 ай бұрын
Thanks for showing us how to fix this, I am confused about the reasoning though. You are saying that we need to avoid having a function that depends on the table on the one side. How is DISTINCT ( PriceRanges[PriceRangeKey] ) not dependent on PriceRanges[PriceRangeKey]?? It seems that you are saying that the root issue is referential integrity. If the key is connected by the relationship, and therefore included in the expanded table, then the value from PriceRanges is already there and no query on the calculated table is required. If the key in the fact table is not in PriceRanges[PriceRangeKey], then the engine queries PriceRanges. I don’t get why it needs to do that. I guess the high level takeaway is to ensure no RI errors.
@SQLBI
@SQLBI 4 ай бұрын
The dependency is on the BLANK value that is included if the relationship is invalid. Check out www.sqlbi.com/articles/understanding-blank-row-and-limited-relationships/ and www.sqlbi.com/articles/blank-row-in-dax/
@brunof.s.8186
@brunof.s.8186 5 ай бұрын
This is one of those videos where my only reaction is 🤯
@hervebessone2759
@hervebessone2759 6 ай бұрын
A HUGE THANK YOU for this video and all(noblankrow 😂) the others by the way. You solved the problem that puzzled me for two days. What a coincidence!
@mwaltercpa
@mwaltercpa 6 ай бұрын
Great video Marco. Context trans question: At 24:00 is it fair to imagine that the filters converting all col (including expanded col) into filer context are hidden VALUES() filter in CALCULATE for each column reference? VALUES honors the blanks, and that leads us to remove those filters? Thanks again!
@marcorusso7472
@marcorusso7472 6 ай бұрын
Not really. The context transition gets the row context (on Sales) and transform it into a filter context over the expanded table Sales. However, the filter is a table that has one row and many columns of different tables. Imagine this (simplified): VAR FilterFromContextTransition = TREATAS ( { Sales[Net Price], Sales[PriceRangeKey], RELATED ( PriceRange[PriceRangeKey] ), RELATED ( PriceRange[Min] ), RELATED ( PriceRange[Max] ) }, Sales[Net Price], Sales[PriceRangeKey], PriceRange[PriceRangeKey], PriceRange[Min], PriceRange[Max] ) RETURN CALCULATE (..., FilterFromContextTransition ) The CALCULATE receives a filter that has one row and several columns - some of them could be blank, but that is not the direct reason why you see the circular dependency.
@mwaltercpa
@mwaltercpa 6 ай бұрын
This helps me, I appreciate the detailed explanation. Thank you Marco. Looking forward to the new offerings this year.
@riteshbarthwal5024
@riteshbarthwal5024 4 ай бұрын
Hello can somebody pls explain me the code on 26min:58sec. In first two filter context we are applying filter on priceranges table and in 3rd filter context we are removing filter from entire table priceranges.
@SQLBI
@SQLBI 4 ай бұрын
The filter removal takes precedence in CALCULATE - see dax.guide/CALCULATE/
@riteshbarthwal5024
@riteshbarthwal5024 4 ай бұрын
@@SQLBI Thank you, really appreciate!
@riteshbarthwal5024
@riteshbarthwal5024 3 ай бұрын
@@SQLBI hello team can you please explain this topic on Whiteboard sessions?
@riteshbarthwal5024
@riteshbarthwal5024 3 ай бұрын
@@SQLBI sorry team, but need one more clarification for the same code. Can you please how is the value of variable currentprice changing its value in each row context. Looking for your response or anyone who can guide me on this.
@Charlie888
@Charlie888 6 ай бұрын
Using tuple syntax in DAX expressions
32:24
SQLBI
Рет қаралды 8 М.
Replacing relationships with join functions in DAX
18:17
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 24 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Formula engine and storage engine in DAX
25:50
SQLBI
Рет қаралды 22 М.
Solving errors in CALCULATE filter arguments
30:55
SQLBI
Рет қаралды 27 М.
Why I Quit the Scrum Alliance
7:58
The Passionate Programmer
Рет қаралды 10 М.
Optimizing callbacks in a SUMX iterator
14:10
SQLBI
Рет қаралды 6 М.
Differences between DATEADD and PARALLELPERIOD in DAX
40:49
Improve data labels with format strings
21:21
SQLBI
Рет қаралды 8 М.
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 25 М.
Best practices for using KEEPFILTERS in DAX
28:24
SQLBI
Рет қаралды 9 М.
Bidirectional relationships and ambiguity
14:02
SQLBI
Рет қаралды 99 М.
Как слушать музыку с помощью чека?
0:36
Tag her 🤭💞 #miniphone #smartphone #iphone #samsung #fyp
0:11
Pockify™
Рет қаралды 22 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,8 МЛН