Forum Discussion

ABCD1234's avatar
ABCD1234
Regular Visitor
9 years ago
Solved

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

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.

 

  • 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.

     

     

    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.

     

     

     

     

     

     

     

     

     

1 Reply

  • deldersveld's avatar
    deldersveld
    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.

     

     

    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.