cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrewDang Member
Member

Rearrange Pies in Pie Chart

Hello all;

 

I am wondering if there is a way that we can re-arrange the positions of the pies in a pie chart.  Let say that I have a pie chart of population of states in the pacific (Alaska, Washington, Oregon, California, Hawaii) that I want to re-arrange a little different that what PowerBI would give me.

 

Let me know if you have any idea.  Thanks in advance for your help.

Andrew

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Rearrange Pies in Pie Chart

@AndrewDang

You have to create separate Measures to Calculate the Population for each State.

And even then you won't have complete control.

Pie Chart 1.png

Here's with the Measures...

Pie Chart 2.png

Dragging the Measures in the Values area up and down doesn't always work

You may have to start with a new pie chart and change the order in which you add each State to the pie

 

Whether this is worth it depends on how many states you have

9 REPLIES 9
Highlighted
Super User
Super User

Re: Rearrange Pies in Pie Chart

@AndrewDang

You have to create separate Measures to Calculate the Population for each State.

And even then you won't have complete control.

Pie Chart 1.png

Here's with the Measures...

Pie Chart 2.png

Dragging the Measures in the Values area up and down doesn't always work

You may have to start with a new pie chart and change the order in which you add each State to the pie

 

Whether this is worth it depends on how many states you have

AndrewDang Member
Member

Re: Rearrange Pies in Pie Chart

Thanks @Sean for the tip. That should get me going for now.  Ultimately, I would like the ability to "drag and drop" the pies to rearrange them according to my needs.  I don't believe PowerBI supports this feature yet.

 

Thanks;

 

Murad Frequent Visitor
Frequent Visitor

Re: Rearrange Pies in Pie Chart

Hello @Sean , 

 

Could you help me out with this one too. I ve created a shape map and i have me legends looking like this now. 

 

legend_driving_me_nuts.png

 

 

I need them from "1-3" and then to "30-35" in order. Im sure they're the same steps. but could you simplify for me - been using this great software for 2 days so far. 

 

Regards,

Murad. 

dkay84_PowerBI New Contributor
New Contributor

Re: Rearrange Pies in Pie Chart

You need to create a separate column that provides a numeric order for those string values. Then, on PBI desktop UI, under the "modeling" tab is a "sort by" option and you choose the order column you created
Super User
Super User

Re: Rearrange Pies in Pie Chart

@Murad Couple things. First, If a post is marked as solved, or is really old it is useful to just create your own post. You can still reference the old one if necessary.

Secodn, What is your data source? I recognize the above solution from another thread so I know that if you create another calculated column on the range you will get a circular reference error. Depending on the source of data, if you loaded the sort order (or the ranges) for that matter from the source than it would work with the (Sort by column).

Example, if this is from SQL then you could do a "CASE" statement. If from Excel, you could basically write the same "IF" statement with slight changes in the file for both the range and the sort order column.

Near SE WI? Join our PUG MSBIWI
Murad Frequent Visitor
Frequent Visitor

Re: Rearrange Pies in Pie Chart

Thank you @Seth_C_Bauer and @dkay84_PowerBI - life saving people. 

pji Regular Visitor
Regular Visitor

Re: Rearrange Pies in Pie Chart

It doesn't seem to work for me this way. I tried addine a new sort column. Could you may be share an example or a screenshot for this, if possible?

Jurgita Frequent Visitor
Frequent Visitor

Re: Rearrange Pies in Pie Chart

I would like to rearage legend in stacked bars, and were redirected here. But what this option i cannot understand well.

If I have bars stucked of 10 items, lets say, should i create 10 measures in order to callcuate each of them and then to use in  values? But this is so unhandy!

Isn't there really a better way to re-oder legend?

 

pratk30 Regular Visitor
Regular Visitor

Re: Rearrange Pies in Pie Chart

@Sean

I am new to Power Bi, Could you please help me with Measure , what expression i need to choose to create. So that can seperate data from status column.

 

Regards,

Prateek