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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
vjnvinod
Impactful Individual
Impactful Individual

Visual sorting

Hi,

I have created a calculated coloumn using the below Dax

Status = IF('GCSP & MSL'[Moved?]="Yes","Moved", IF( SEARCH("TBC",'GCSP & MSL'[Additional info],1,0)>0,"Under Discussion",

IF( SEARCH("NoNoNo",'GCSP & MSL'[Region&SLnow&oldSL&exception&TBC&Duplicate],1,0)>0 && SEARCH("CBS",'GCSP & MSL'[Region&SLnow&oldSL&exception&TBC&Duplicate],1,0)>0,"In Markets, Other SMU",

IF( SEARCH("Yes",'GCSP & MSL'[Region&Exception],1,0)>0,"Exceptions","To Move")))) and

created a visual like below

 

Capture.PNG

 

now i would like to sort this in the below order

 

Moved,

In Markets,

To move,

Under discussion,

Exceptions

 

I tried creating another calculated coloumn to achieve this using IF function, and its throwing me error

"failed to save modification to the server: A circular dependency detected.....)

 

below is the formula i used

 

sortingstatus = IF('GCSP & MSL'[Status]="Moved","1",
IF('GCSP & MSL'[Status]="In Markets, Other SMU","2",
IF('GCSP & MSL'[Status]="To Move","3",
IF('GCSP & MSL'[Status]="Under Discussion","4",
IF('GCSP & MSL'[Status]="Exceptions","5","")))))
 
any suggest on this will be helpful, as i am not able to sort the visual the way i want
9 REPLIES 9
amitchandak
Super User
Super User

@vjnvinod , this because the sort column is baed on the same column

 

create a new column

Status 1= MSL'[Status]=

 

sortingstatus = IF('GCSP & MSL'[Status]="Moved","1",
IF('GCSP & MSL'[Status]="In Markets, Other SMU","2",
IF('GCSP & MSL'[Status]="To Move","3",
IF('GCSP & MSL'[Status]="Under Discussion","4",
IF('GCSP & MSL'[Status]="Exceptions","5","")))))

 

now sort Status 1 on sortingstatus  and use Status 1 in your report

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak 

 

it throwing up error

 

Capture.PNG

@vjnvinod , Try like

sortingstatus = Switch(True() ,
'GCSP & MSL'[Status]="Moved",1,
'GCSP & MSL'[Status]="In Markets, Other SMU",2,
'GCSP & MSL'[Status]="To Move",3,
'GCSP & MSL'[Status]="Under Discussion",4,
'GCSP & MSL'[Status]="Exceptions",5,10)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak 

 

it doesn't work either

 

see below same error

 

Capture.PNG

@vjnvinod , what is there between column name and Switch . I see two = .

 

This is a column in table 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak 

 

you provided the double "=" forumla in the first reply to this thread, i thought you might have some logic for that

 

see below you response

 

this because the sort column is baed on the same column

 

create a new column

Status 1= MSL'[Status]=

 

sortingstatus = IF('GCSP & MSL'[Status]="Moved","1",
IF('GCSP & MSL'[Status]="In Markets, Other SMU","2",
IF('GCSP & MSL'[Status]="To Move","3",
IF('GCSP & MSL'[Status]="Under Discussion","4",
IF('GCSP & MSL'[Status]="Exceptions","5","")))))

 

now sort Status 1 on sortingstatus  and use Status 1 in your report

@vjnvinod ,

 

Column 1

Status 1= MSL'[Status]

 

Column 2 

sortingstatus = IF('GCSP & MSL'[Status]="Moved","1",
IF('GCSP & MSL'[Status]="In Markets, Other SMU","2",
IF('GCSP & MSL'[Status]="To Move","3",
IF('GCSP & MSL'[Status]="Under Discussion","4",
IF('GCSP & MSL'[Status]="Exceptions","5","")))))

 

sort column 1 on column 2 and try 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak 

Perfect, worked like a charm 🙂

@vjnvinod ,  😀

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.