Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Order legend in line graph

Hi!

 

I have a line graph with a dynamic legend. How do I order the legend?

Same question for a matrix btw.

 

It looks like this:

 

 

And I have a table that kind of looks like this:

 

But I want the line graph ordered by month on the x-axis of course.

 

2 Replies

  • BraneyBI's avatar
    BraneyBI
    Icon for Kudo Commander rankKudo Commander

     Create a calculated column in the same table as your Value field, which has the appropriate sort order - call it ValueSort

    Then apply "Sort by columns" (from the modeling ribbon)  to the Value column using the ValueSort column.


    When you use the Value column in your visual, it will now be properly sorted. 

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Icon for Community Support rankCommunity Support

    Anonymous,

     

    Given the sample data, you may take advantage of Id column.