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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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