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

View all the Fabric Data Days sessions on demand. View schedule

Reply
amalrio
Helper V
Helper V

sorting a stacked area chart by value

Hi helpful people, 

 

how do I sort stacked area graph by x axis as well as value plotted, for instance I want below graphs blue coluours section in the bottom of the graph(NA Plant data in the below data table) as B plant show in the bottom of the graph (I assume it sort by the ledgend) I want to sort by the value.

 

 

 

amalrio_0-1604541542203.png

 

 

Below is my data set.

 

what I want in the Graph is NA Plant bottom of the graph( in the above graph it is in the Blue section.)  years has to be from 2021 to 2025 (incrreasing frequency)

Capture1.PNG

 

thanks for your help in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@amalrio , I am assuming you are taking of legends.

You need to create columns like

Plant1 =[Plant]

Plant1 sort = switch(true(),

[Plant] = "NA",100,

[Plant] = "Plant",1,

// add others

1000

)

and sort plant 1 on plant 1 sort and use plant 1

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@amalrio , I am assuming you are taking of legends.

You need to create columns like

Plant1 =[Plant]

Plant1 sort = switch(true(),

[Plant] = "NA",100,

[Plant] = "Plant",1,

// add others

1000

)

and sort plant 1 on plant 1 sort and use plant 1

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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