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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DataEnth
Regular Visitor

Order dynamically in stacked bar

Hi,

 

I'm trying to sort the categories in descending order based on the total value but  "other" should always be the last one. It's too complicated for me, I tried many option but always error, please help me.

DataEnth_0-1757406404552.png

 

 

I tried 

_Sir = IF(ISBLANK(dmt_ws_windows11[sir]),"Other",dmt_ws_windows11[sir])
 
Sort_Sir = IF(isblank(dmt_ws_windows11[Sir]),2,1)
 
and I sort _Sir by Sort_Sir but it doesn't work, any solution please?
2 ACCEPTED SOLUTIONS
mh2587
Super User
Super User

You need to create sorting column for this


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



View solution in original post

Ritaf1983
Super User
Super User

Hi @DataEnth 
Please relate to my solution in other post :
https://community.fabric.microsoft.com/t5/Desktop/Sorting-stacked-chart/m-p/4091617/highlight/true#M...

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

8 REPLIES 8
v-hjannapu
Community Support
Community Support

Hi @DataEnth,

Thank you  for reaching out to the Microsoft fabric community forum.

I would also take a moment to thank @Ashish_Mathur , @Ritaf1983 , @mh2587 , @srlabhe for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

I understood your requirement. In Power BI, direct sorting will not work when you want descending order by total and at the same time keep “Other” always at the end.

Best way is to create one custom sort column. In that column, give rank based on totals and for “Other” keep the highest rank, so it will always stay last. Then use this column to sort your axis.

 

If still you face any issue, please share a small sample data and your PBIX file, then we can look into it and help you fix it.

Regards,
Community Support Team.

Hi @DataEnth,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

Regards,
Community Support Team.

Hi @DataEnth,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


Regards,
Community Support Team.

Hi @DataEnth,

I wanted to follow up and see if you have had a chance to review the information that was shared. If you have any additional questions or need further clarification, please don’t hesitate to reach out. I am here to assist with any concerns you might have.

Regards,
Community Support Team.

Ashish_Mathur
Super User
Super User

Hi,

Not sure how much i can help but i'd like to try.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
srlabhe
Helper V
Helper V

Try using Custom Sort 

Ritaf1983
Super User
Super User

Hi @DataEnth 
Please relate to my solution in other post :
https://community.fabric.microsoft.com/t5/Desktop/Sorting-stacked-chart/m-p/4091617/highlight/true#M...

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
mh2587
Super User
Super User

You need to create sorting column for this


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.