cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
germanobasler Regular Visitor
Regular Visitor

Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hello folks,

 

I am struggling to use an Excel Pivot Table function, like the one you pick a label and simply drag to the left or right in order to change the presentation of a Pie Chart (or any other chart). Let me enphasize that I DO NOT wish to order ascending or descending, because the  labels are "TEXTS", so it doesn´t matter what they are, but there is an order I wish to follow. For exaple, period "1-30 days" first, then "30-60 days", then "60-120 days" and finally "Above 120 days".

 

I cannot think that it is not part of Power BI structure, so please help!

 

 

Example:

Power BI pie chart.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
mshparber Established Member
Established Member

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

It is important that you use "Sort by column" from the upper menu after you have selected the Category column. From the options you will see, select the Order column. 

 

It is not the same as just ordering a table by a column, it is ordering a column by another column. 

 

Michael

View solution in original post

17 REPLIES 17

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hi @germanobasler

 

What sort options do you have in the visual options in the top right hand corner of the visual?

 

sort by pie.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Highlighted
germanobasler Regular Visitor
Regular Visitor

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hello Phil, thanks for replying.

 

Here are the options:

pie chart reply.JPG

 

But I do not wish to "Sort" in any way, I wish to change the order manually, like we can do with automated "Pivot-Table Graphs". Basically, for it to work "sorting", I´d have to name the categories in a determined "sortable" way. Sometimes it is not possible. And turning back to the database in Power BI is not the the right move with this great tool.

 

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

One option is to create measures for each wedge of your pie and then drag multiple measures

 

eg.

 

Measure A = 10

Measure B = 20

Measure C = 5

And then you can drag the three measures to the Values area where you can control the order.  You can replace my hardcoded values with your actual calculations.

 

pie sorting.png

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

mshparber Established Member
Established Member

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

@germanobasler

You can achieve this using "Sort by Column" under Modeling menu.

See the difference - one chart is sorted by ABC automaticaly

The other one - using "Sort by column".

In your "CategoriesDim" table add an Order column and sort the Category column by it.Sort.JPG

 

 

Pies.JPG

 

 

 

 

Microsoft v-huizhn-msft
Microsoft

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hi @germanobasler,

You problem has been resolved? If you have resolve, please mark the right replay as answer, or welcome to share your solution. Other people will find workaround clearly. If it hasn't, please feel free to ask any issue.

Best Regards,
Angelia

germanobasler Regular Visitor
Regular Visitor

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hello Angelia, thanks for asking.

 

Unfortunately my problem has not been resolved. I really tried the suggestions, either way it did not succeeded. My database is composed by thousands of lines, which are summarized in this pie chart. Not sure that these solutions apply for such a database.

 

Moreover, these solutions are far more complicated than it should be to solve this simple thing with almighty MS Power BI.

 

Still waiting for a step-by-step solution to this pie chart question.

germanobasler Regular Visitor
Regular Visitor

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Thanks for your feedback.

 

Am I not loosing the label of the real data presented in the pie chart wedges?

 

I didn´t figure it out the way it really works, so I still have this scrambled wedges in my pie chart.

 

Regards,

GB

germanobasler Regular Visitor
Regular Visitor

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Your database is very short. Do you think it works for thousand-long databases, where each of the pie chart slices have more than 500 lines and the size of the slices represent the sum ou count of those hundreds of lines?

Microsoft v-huizhn-msft
Microsoft

Re: Pie Chart Order of Slices (NOT accordingly to letters of numbers order)

Hi @germanobasler

I personally suggest you handle your resource data in database, then load the result table to Power BI to visual them.

Best Reegards,
Angelia

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (2,374)