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

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

Reply
sittitek
New Member

Ascending data within graph

Dear all,

I would like to ascend the data value, number, within each bar graph. 

in the picture, it sorts by the alphabet 

sittitek_0-1596166804115.png

 

thank you very much

 

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @sittitek ,

If you want to sort it by number in the bar chart, you can create a calculated column like this and put it in the legend field:

Column =
VAR _date = [Date]
RETURN
    RANKX ( FILTER ( 'Table', 'Table'[Date] = _date ), 'Table'[value],, ASC, DENSE )

rankx.png

 

Best Regards,
Yingjie Li

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

amitchandak
Super User
Super User

@sittitek , this will sort only on legend inside the bar. If there are more values control it by subtotal rank

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
lbendlin
Super User
Super User

Note that there is an "i" warning. You are trying to show too much data. Might want to limit it to the top x per date.

 

Anyway, I don't think the standard stacked bar has the option to sort each individual bar differently.  There might be custom visuals out there that do that.

Thanks, Ibendlin

this is published data from a general website. 

 

I will search for custom visuals as you recommend. thank you.

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors