Forum Discussion

askugor's avatar
askugor
New Member
7 years ago
Solved

Strange Circular Dependency issue

I've made very simple pbix (only one table with 2 columns and 6 rows) where I've got circular dependency error in calculated column.

Please, does anybody know what's wrong with this calculated column?

  • Hi askugor,

    Let me first apologize for not looking at your formula correctly I was on my cellphone and not on the computer, it's not an excuse for pointing a bad answer but again sorry.

    Regarding your question check the post below about circulary dependance.

    https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/

    As you can see the use of VALUES, DISTINCT and ALL in calculated tables can many times create circulary dependecy due to the internal dax motor and how this formulas are calculated.

    Hope this helps, and my apologies once again.

    Regards,
    MFelix

4 Replies

  • Hi askugor,

    You are calculating a column and then placing a filter on the full table this includes the calculated column so the circular dependency.

    Try to change the table in filter to ALL(TestTable[NR]).

    Regards,
    MFelix
    • askugor's avatar
      askugor
      New Member

      Thanks MFelix,

       

      then I have another question:)

      Why this slightly changed formula doesn't make circular dependency:

       

      TestColumn = CALCULATE(CONCATENATEX(TestTable;TestTable[Name];"-");FILTER(TestTable;TestTable[Nr]<EARLIER(TestTable[Nr])))
       
      I've just removed VALUES and didn't insert ALL.
       
      Thank you
       
       
       
      • MFelix's avatar
        MFelix
        Super User
        Hi askugor,

        Let me first apologize for not looking at your formula correctly I was on my cellphone and not on the computer, it's not an excuse for pointing a bad answer but again sorry.

        Regarding your question check the post below about circulary dependance.

        https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/

        As you can see the use of VALUES, DISTINCT and ALL in calculated tables can many times create circulary dependecy due to the internal dax motor and how this formulas are calculated.

        Hope this helps, and my apologies once again.

        Regards,
        MFelix