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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Bryanna
Helper II
Helper II

Sorting

I have a Slicer that i created off a column to show how many days from expiration. I would like to sort this so that its in order of least number of days to most number of days (ex. 30 Days from Expiration, 60 Days from Expiration, 90 Days from Expiration, 365 Days from Expiration). Every way I try to sort I keep receiving an error of 'circular dependency' or that 'there cant be more than one value in Column A for the same value in Column B' . Any tips are appreciated!

 

Bryanna_0-1692620986822.png

 

4 REPLIES 4
Bryanna
Helper II
Helper II

Thanks! I changed this to a calculated column within power query and it works now. Thanks for your help!

Bryanna
Helper II
Helper II

Hi,

 

The column is created using Dax and when i try to do a similiar statement as you stated above also in Dax and Power Query (tried both options) is when I am receiving the above errors. Is there a way to do it with my original column in DAX?

@Bryanna You could try replicating the DAX column logic in PowerQuery. Then create another conditional column for sort order. Then change the change the Sort by Column property of PowerQuery column.

 

If you still want to keep DAX column, then you can prefix the order in return value. example: a. 30 Days from Expiration, b. 60 Days from Expiration. This is not a good solution. 


Regards,
Nandu Krishna

nandukrishnavs
Community Champion
Community Champion

@Bryanna If the column is not created using DAX, then you can create a new conditional column in PowerQuery. Output should be number: 1, 2, 3, 4 etc.. (Expected sort order value) then close and apply the PowerQuery changes. 

Next come to the Table view, and select original column and change the Sort by Column value as newly created column.

 

nandukrishnavs_0-1692622087712.png

 


Regards,
Nandu Krishna

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.