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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ABCD1234
Regular Visitor

PowerBI legend ordering

Hi, 

 

I am trying to create a multi series line chart using the following data. (Pic attached) 

FEATURESLTLPRODUCT APRODUCT BPRODUCT CPRODUCT DPRODUCT EUTL
LENGTH-0.5-0.20.150.15-0.17-0.170.5
WIDTH-0.5-0.20.20.16-0.160.170.5
HEIGHT-0.5-0.190.150.06-0.120.10.5

lineChart.PNG

However, the order of the Products in the legend is the order in which they have been added in the "Values" field. Is there a way i can create a custom order for the legends rather than having to add them in that order under "Values" field. 

 

Also, currently the data is for PRODUCT A to PRODUCT E. Suppose i replace the data with that for 5 new products (say PRODUCT F, PRODUCT G, ...)how do i refresh the data without having to create the graph all over again.

 

I m not sure how this can be done in powerbi. Looking forward to any kind to leads...

 

Thanks.

 

1 ACCEPTED SOLUTION
deldersveld
Resident Rockstar
Resident Rockstar

Especially if you plan to add new products over time, will be much easier to work with your data in a different format. If you unpivot the data and then load it, you would only have one Value column to add to the line chart, and as you add new products, they would simply become new Attributes.

 

PBI-Unpivot.PNG

 

With the unpivoted data, you can setup your line chart as in this screenshot, and you can then click on the [...] in the top corner and sort by either the Features or Value.

PBI-LineChart.PNG

 

 

 

 

 

 

 

 

 

View solution in original post

1 REPLY 1
deldersveld
Resident Rockstar
Resident Rockstar

Especially if you plan to add new products over time, will be much easier to work with your data in a different format. If you unpivot the data and then load it, you would only have one Value column to add to the line chart, and as you add new products, they would simply become new Attributes.

 

PBI-Unpivot.PNG

 

With the unpivoted data, you can setup your line chart as in this screenshot, and you can then click on the [...] in the top corner and sort by either the Features or Value.

PBI-LineChart.PNG

 

 

 

 

 

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.