Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
How to sort column by custom
I want to sort column status by completed error cancel
Guide me please
Solved! Go to Solution.
On the tree dots of the bar you can select the sorting by percentage
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
In this case you need to add an ID column that has one value per each one :
ID - Status
1 - Completed
2 - Error
3 - Cancel
On the query editor add a custom column with the following code:
if [status] = "Completed" then 1 else if [status] = "error" then 2 else 3
Then do a sort by
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix if i want sort completetd, on the way, cancel, error, blank
Guide me please.
The format is the same you just need to add additional syntax for each vbalue:
if [status] = "Completed" then 1
else if [status] = "on the way" then 2
else if [status] = "cancel" then 3
else if [status] = "error" then 4 else 5
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix I want to sort status completetd, on the way, cancel, error, blank.
and If status = on the way I want to sort progress lowest to highest
Guide me please.
HI @Anonymous ,
For this you need to use the shift on the visualization table, you first sort by the Status and then keeping the SHIFT pressed you click on the progress
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix then keeping the SHIFT pressed you click on the progress.
Please explain to me, I DON'T understand.
Hi @Anonymous ,
Check the link below with full explanation:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@MFelix If I want sort 2 option by step1 sort by status and sort by %progress.
Example if status = on the way , step 2 sort by %progress from ascending
Guide me please.
Hi @Anonymous ,
You can add one step in your Advanced Editor just like below screenshot:
#"Sorted Rows" = Table.Sort(#"Added Custom",{{"Custom", Order.Ascending}, {"%progress ", Order.Ascending}})
Best Regards
Hi @Anonymous ,
Is this sorting to be made on a table visualization?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsOn the tree dots of the bar you can select the sorting by percentage
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsJoin the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.