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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
CAmala
Frequent Visitor

Custom Order in every Legend

Hi everyone

I need your help, please.

 

In this table, columns Id_contable and IdCont_mes are set to Sort by secuencia.

CAmala_2-1674604073090.png

If I change month by Id_Contable the order is that I want it.

CAmala_0-1674604963295.png

But when I use the month column, the chart shows another Order. How can I order in Sep, Oct, Nov, Dec, Jan, Feb?

 

CAmala_2-1674605093085.png

 

Thanks

Camala

1 ACCEPTED SOLUTION
adudani
Super User
Super User

@CAmala ,

 

create a month sort column ( example:SWITCH (TABLE[MonthColumn], 1, Sept, 2, Oct , etc)   whatever sorting order you want)
in the data view, select the month column and use the "sort by column" to sort by this custom column.

 

for reference: (146) Power BI - Custom Sorting in 3 Easy Steps! - YouTube

 

here they sort using a table but you can sort using a new column as well.

 

Appreciate a thumbs up if this is helpful.

 

Please let me know if this resolves the question

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

View solution in original post

3 REPLIES 3
adudani
Super User
Super User

@CAmala ,

 

create a month sort column ( example:SWITCH (TABLE[MonthColumn], 1, Sept, 2, Oct , etc)   whatever sorting order you want)
in the data view, select the month column and use the "sort by column" to sort by this custom column.

 

for reference: (146) Power BI - Custom Sorting in 3 Easy Steps! - YouTube

 

here they sort using a table but you can sort using a new column as well.

 

Appreciate a thumbs up if this is helpful.

 

Please let me know if this resolves the question

 

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Hello - How do I CUSTOM sort when using a line chart visual, and trying to order the hover?  I don't want to sort on the Legend's field.  I want to sort on the Legend's field's Y axis value.  See pic below.  The hover has the value but forces sort on legend field, not on the legend field's value.

 

This kind of hover sort would be dynamic.  So I can't create a table ranking.  Anywhere the data point is on the line chart, the hover could possibly order differently based on the which product's value is highest to lowest.

 

Breaking down.

1. The line chart legend is Product Name (currently sorting alpha), while calling out the Y axis value next to the product name in the "hover popup".

2. I want to sort the "hover box/tool tip" by the Product Name's "Sales" which is my Y axis field. 

3. once I can custom sort on the legend's Y axis value, I would like it to stack in decreasing order.  (meaning highest Product Sales on top and decreasing below. 

 of the values?  Meaning the legend is by Product Name, but the hover alphabatizes them in the tooltip/hover.  

Thx if you can assist.  I am new but know how to create measures, and columns if that helps. 

Line Chart Hover - Change order by  Y axis value not legend fieldLine Chart Hover - Change order by Y axis value not legend field

Thank you @adudani it was so helpful

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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