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
Anonymous
Not applicable

100% stacked bar chart sort X-axis using using selected category slicer.

Hi Community,

I have one category slicer and it's category is early dispetch, late dispetch, dispectch at same day and not dispetch.
100% sctecked bar chart have four measure which represents simple count of four category value on x-axis and Y-axis have region column.

here i want to
1. when i select any of one category (Ex,dispectch at same day ) in category salicer then 100% stacked bar chart shows the first category as dispectch at same then after rest of category is displayed.
2. when i selecte random two categorys (Ex,dispectch at same and late dispetch) then it will display the selected two categorys first on x-axis in chart then after rest of the category is display.

Thanks
Finaz


1 REPLY 1
bhanu_gautam
Super User
Super User

@Anonymous , You can create a measure for sorting

 

 
        SelectedCategoryOrder =
        VAR SelectedCategories = VALUES('YourTable'[Category])
        RETURN
        SWITCH(
            TRUE(),
            "dispectch at same day" IN SelectedCategories, 1,
            "late dispetch" IN SelectedCategories, 2,
            "early dispetch" IN SelectedCategories, 3,
            "not dispetch" IN SelectedCategories, 4,
            5
        )
 

Go to the Data view. - Select the Category column. - In the Column tools tab, click on "Sort by Column" and select the SelectedCategoryOrder measure.

Update the Visualization:

Go back to your report view.
Ensure that the 100% Stacked Bar Chart is sorted by the Category column, which now has the custom sort order applied




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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.