Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AshDil
Helper V
Helper V

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.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AshDil , Create a new column

Month name 1= 'Table'[Month Name]

 

Sort month 1 on MonthNum and use that in visual

 

 

refer if needed

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@AshDil , Create a new column

Month name 1= 'Table'[Month Name]

 

Sort month 1 on MonthNum and use that in visual

 

 

refer if needed

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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)))
MINGXIN_1-1698890393892.png

 

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.  
MINGXIN_0-1698889249613.png

 BR,

Soldier

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.