Forum Discussion

AshDil's avatar
AshDil
Helper V
4 years ago
Solved

Circular dependency detected while sorting a column

Hi,

 

I have a month_name column which I need to sort as Jan, Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec.

For that I have created calculated column to get month numbers from month_name as below:

MonthNum = MONTH(DATEVALUE('Table'[Month Name]&"/1")) 

 Now I'm trying to sort my month_name column using above calculated column it is giving Circular dependency error.

Please help me to do.

 

Thanks,

AshDil.

 

3 Replies

    • MINGXIN's avatar
      MINGXIN
      Helper I

      Hi amitchandak ,

       

      Hope you are well.

      I'm having the same problem. Im created the below table based on the fact table, 

      ColorNumber_OrderTab = DISTINCT(Fact_QTY_Cost[colornum])
      ,then I created a logic column:
      new_order = IF('ColorNumber_OrderTab'[ColorNum_old]="Others",99999,CONVERT('ColorNumber_OrderTab'[ColorNum_old],INTEGER)).
       
       I get an error when I want the old fields to be sorted by the new_order field
      So confused.  

       BR,

      Soldier

    • MINGXIN's avatar
      MINGXIN
      Helper I

      Hi amitchandak ,

       

      I tried building both fields at once and it worked.

      I hope this is useful to others~~

      new_order_color = SUMMARIZE(Fact_QTY_Cost,'Fact_QTY_Cost'[颜色数],"order",if('Fact_QTY_Cost'[颜色数]="Others",99999,CONVERT('Fact_QTY_Cost'[颜色数],INTEGER)))