Avoiding circular dependency errors in DAX

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

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

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

    Excellent. I'm beginer DAX and I red from your book about it, it was very clearly but waching with vidio is a big pleasure. Thank you Mr Alberto

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

    you are not only a PBI master, you are a mind reader as well . I had to get some work done and was hitting exactly the circular dependency scenario when creating a bridge table - this technique saved me tons of hours of research - THANK YOU !!! Grazie caro!!!!

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

    Thank you so much for this. Just to help you in your English grammar since you helped me in my DAX, after "did" you need to put everything in past tense, so "is" becomes "was" and you also need to turn the gerund "creating" into the verb "to create." So instead of "What I did is creating a table" one says, "What I did was to create a table"

  • @vini_sepol
    @vini_sepol 11 หลายเดือนก่อน +1

    Thank you so much for your explanation! You've helped me a lot. I was stuck on this circular dependency problem and your video was the only one that really helped me to solve it. From now on I'll make sure to properly set the "ALLEXCEPT" in all my "CALCULATE" functions. Keep doing your videos. Excellent content! Many thanks from Brazil (:

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

    So not only are the SQLBI guys putting out great content, but now they are also mastering the art of the TH-cam thumbnail image 😀. Love the expression Alberto. Keep up the good work, we all benefit from it!

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

    Thanks a lot for sharing this with us! I struggled to understand why my calculate table was not accepting the relationship. Now I understood. Thanks again!

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

    Excellent. I’m just wondering if you know how good your videos are for everyone who is eager to learn DAX? Thank you Alberto!

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

    Words cannot express how helpful this was. I was just about to give up until I found this.

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

    Show!!!!
    Being able to resolve an addiction by watching this video. Thanks!!!

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

    Amazing !! you wonderfully explained how to avoid Circular dependency, this helped me in many cases and to understand how Power BI deals with it in backend. Thanks a lot for the help !! :)

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

    Thank you for the video, really helped understanding why this kind of errors occurs.

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

    Fantastic video...I have been struggling with this issue long enough!

  • @sibinmathewjose1335
    @sibinmathewjose1335 6 หลายเดือนก่อน +1

    You are awesome! I was working for this issue for so long! Thanks alot!

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

    Amazing! I was struggling with this. I could not solve it, so I turned to SQL.
    Now I know. 😀
    Just curious if you would use calculated table, whether that would be faster than using the filter function.

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

    This video is a lifesaver, thank you so much!! Been Battling this issue for days and you helped me understand and solve my problem ;-)

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

    Hi, So breaking circular dependency this way will not break data lineage.
    Thank you 👍

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

    You are convencing me to take the dax course ...

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

    This video was a life saver, thank you so much and keep it going, you're a master!

  • @davedavedavedavedavedavedave
    @davedavedavedavedavedavedave 8 หลายเดือนก่อน +1

    Thanks!!!! Solved hours of headache.

  • @PedroHenrique-bp8ts
    @PedroHenrique-bp8ts ปีที่แล้ว +1

    Love you, buddy. Always helping me out

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

    Hi Alberto, I wonder what makes you good for the other ,i mean DAX make you good for chess game (I saw one behind you) or the opposite, but you have to choose one answer or it will be circular dependency🤣
    great video, best continuation

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

    When I use ALLEXCEPT some of my data changed and 2 rows were removed from the calculation analysis. I dont know how to figure out what is right or wrong!

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

    Amazing! this solved my issue in 10seconds. Thanks for the video

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

    How do we resolve the circular dependency between measures....Any idea?

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

    Absolutely fantastic! Really insightful

  • @SimranSingh-sd9yo
    @SimranSingh-sd9yo 3 ปีที่แล้ว +1

    5 min into this video and it solved my problem.

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

    Thank you. It help me save a lot of times.

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

    This is so helpful. Thanks again Alberto!

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

    Extremely useful! Thanks a lot!

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

    Hi, I am experiencing this error but didn't use the CALCULATE expression at all. This error came up when I try to create bins from a calculated column (percentage progress) by a measure divided by a measure. Can you please help?

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

      A measure reference internally implies CALCULATE to perform the context transition.

  • @SimranSingh-sd9yo
    @SimranSingh-sd9yo 3 ปีที่แล้ว

    I have a table created by CALENDARAUTO(12 as my fiscal year value) , I want to create separate column in the same table that returns "Year-Month" in format "2021-May". How can I achieve this through DAX ?

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

      You can see examples here: www.daxpatterns.com/time-patterns/

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

    Excellent video!! :) 👍

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

    Thank you sir. Simple and great explanation

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

    Thanks a lot Alberto... really helpful!!!!

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

    Amazing video!!! Thanks!

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

    Pease can you help me with this situation: Daily balance = [Receive] + backlog - analyzed
    backlog = var previous balance = calculate ( [Daily balance], Dateadd( Calendar[Date], - 1, Day) ) return previous balance
    I tried multiple things but nothing worked. Calculate column's, measure, nothing worked

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

      Tried everything but nothing worked

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

      DAX doesn't have recursion, you should compute that in a different way (better to prepare the data in advance).

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

    why your results are considering the only the row, and mine is bringing the count of rows of the all table inside all cells?

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

    Molto Grazie !

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

    Thanks a lot, help me a lot !!!

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

    Perfect was my problem today :)

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

    👍👍

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

    Thanks Alberto!! You ended my misery!

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

    wow, amazing!

  • @alouisio
    @alouisio 7 หลายเดือนก่อน +1

    genius

  •  3 ปีที่แล้ว

    I get a ciruclar dependency that i do not understand.
    I want to create a relationship on a calculated table.
    I've simplified the Table as much as possible to exclude Issues and the Modell has no RI Violations, so no Blank Rows:
    CrossEmpl =
    VAR _Empl1 =
    SUMMARIZECOLUMNS(
    Employees[DAEmplID]
    , 'Date'[CY Month] -- this is to group by month (first date of Month)
    , "@CE Hours", [HP Hours] -- HP Hours = SUM ( HoursPosition[HP_Hours] )
    )
    RETURN _Empl1
    If i want to create relationships with the Employee or Date Table i get this Errors:
    A circular dependency was detected: CrossEmpl[CrossEmpl-...guid..,ae4], ...guid...c62(*changing), CrossEmpl[DAEmplId], CrossEmpl[CrossEmpl-...guid...ae4].
    A circular dependency was detected: CrossEmpl[CrossEmpl-...guid..,ae4], ...guid...09c(*changing), CrossEmpl[CY Month], CrossEmpl[CrossEmpl-...guid...ae4].
    * changes with each try
    If i replace Employees[DAEmplID] by HoursPosition[DAEMPLID] i can create the Relation.
    But for Date this is not possible as i want to group by month.
    Any Ideas why this is causing a Cirular Dependency:
    My Idea is now to duplicate the Date Table and use the Related Columns and not the Related Table, but i do not like this.
    Other Idea is to add year and month or Month (First Date of month) as Columns to my Source Table.
    But i would need to to this for three tables...
    select DATABASE_NAME, TABLE_ID, ROWS_COUNT, RIVIOLATION_COUNT
    from $SYSTEM.DISCOVER_STORAGE_TABLES WHERE RIViolation_Count > 0
    => Nothing

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

      If you are creating the Date table with a calculated table, it could be that one of the columns of the new calculated table has a date data type.

    •  3 ปีที่แล้ว

      ​@@SQLBI No, Date Table is imported from my SQL Database. I just realized that DAX doesn't know date (only DateTime) even that i've cast all Dates to Date. But Problem is also with my DAEmplId (Dataarea Employee ID).
      Again: If i replace DAEmplId with the Key Column on the Fact table it is working. But if i use the Dimension Table this Error is caused.

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

      Please, try to reproduce the problem with the data model of the article and write a comment in the article if you can do that, otherwise it's impossible to analyze the problem in more detail. Thanks!