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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors