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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Enan
Helper I
Helper I

Sort the year bucket in Chronological order

Dear Expert,

Please help to sort the staff experience bucket (Years) in Chronological order for the graph.

I have made a new column in my fact table as "Sort_Year" by using DAX.

However when I used the "SORT by Column" option under column tools to sort the graph it gives circular dependency error.

Kindly assist.

 

Circular Reference ErrorCircular Reference ErrorDAX used to create calculated column in Fact TableDAX used to create calculated column in Fact TableGraph made using FACT table, Experience buckets and  Count of StaffGraph made using FACT table, Experience buckets and Count of Staff

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Enan ,

 

A circular dependency is detected whenever two objects reference each other, in such a way that Power BI cannot process the objects.

From the screenshot, it looks like you created your Sort column based on the original EXP(groups) column and want to rely on the created Sort column to sort the EXP(groups) column, which will create a circular dependency, please consider using a column unrelated to EXP(groups) to sort it. There is another simple way to create a Sort Column in PowerQuery

 

For more details, please refer to:

Avoiding circular dependency errors in DAX - SQLBI

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @Enan ,

 

A circular dependency is detected whenever two objects reference each other, in such a way that Power BI cannot process the objects.

From the screenshot, it looks like you created your Sort column based on the original EXP(groups) column and want to rely on the created Sort column to sort the EXP(groups) column, which will create a circular dependency, please consider using a column unrelated to EXP(groups) to sort it. There is another simple way to create a Sort Column in PowerQuery

 

For more details, please refer to:

Avoiding circular dependency errors in DAX - SQLBI

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DOLEARY85
Super User
Super User

Hi,

 

when you say you created a column, how did you do that?

 

if you create a new table, create an order list for your fields, join this to the original table then bring this through the sort order to the current table as a calculated using something like calcualte(max(table name,order field name)) 

 

you should be able to sort on that,

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Hi,

Thank you for the guidance,

However i did not understand, can you please explain.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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