cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Balhemkan
Helper I
Helper I

Pie chart with others

Hello Team,

 
I am facing difficulty to achieve one requirement.

I am using pie chart  in powerbi
In that I am pulling two columns
CountrySales
India900
Srilanka500
Germany300
Australia1000
Belgium1200
Bangladesh5500
Poland400
 
I want to show top 5 highest countries and rest all should come under "Others" in pie chart. 
like.....
CountrySales
Bangladesh5500
Belgium1200
Australia1000
India900
Srilanka500
Others700
Please help me with dax or any workaround
 
Best Regards,
Balhemkan
2 ACCEPTED SOLUTIONS

Hi @jaideepnema/@Balhemkan  ,

 

Can you please try using this free Pie donut Chart visual from x-viz. The free version gives you the Option to Rank the data as you required by showing TOPN and rest in others. 

 

https://xviz.com/visuals/advanced-pie-donut/

 

FarhanAhmed_0-1614679807126.png

 

 

Regards

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

V-lianl-msft
Microsoft
Microsoft

Hi @Balhemkan ,

 

The visual mentioned by @FarhanAhmed  meets your needs, and there is no need to create a new calculated column.

If you want to highlight the slicer option in the pie chart, try "Enlighten Slicer" visual.

V-lianl-msft_0-1614824727318.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
V-lianl-msft
Microsoft
Microsoft

Hi @Balhemkan ,

 

The visual mentioned by @FarhanAhmed  meets your needs, and there is no need to create a new calculated column.

If you want to highlight the slicer option in the pie chart, try "Enlighten Slicer" visual.

V-lianl-msft_0-1614824727318.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

jaideepnema
Solution Specialist
Solution Specialist

Hi @Balhemkan ,

You can create two calculated columns

 

Top 5 Countries = 

var rankval= RANKX(Data,Data[Sales],,DESC,Dense)

var others=IF(rankval<=5,Data[Country],"Others")

return others
 
Other Countries = IF(Data[Top 5 Countries]="Others",Data[Country],BLANK())
 
and then use these two columns like this to create the pie chart
jaideepnema_1-1614672108315.png

 

Here is the pbix in case required
 
Please accept this as a solution if your query has been answered !!
Appreciate a Kudos 😀

 

Hi @jaideepnema/@Balhemkan  ,

 

Can you please try using this free Pie donut Chart visual from x-viz. The free version gives you the Option to Rank the data as you required by showing TOPN and rest in others. 

 

https://xviz.com/visuals/advanced-pie-donut/

 

FarhanAhmed_0-1614679807126.png

 

 

Regards

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

It is working but based on selection it not showing 

Example if I select australia based on selection top 5 countries we want 

Could you please help

@Balhemkan 

External Filters are going to show only their status in the Visual, When you Select any country it shows that country it self. The filter context should be some thing else to show Top 5 .
I think you need to explain the objective. 

1. When you Select Australia do you want Australia and their down below countries

2. What is the business context show the Top5 

 

It will help us to give you a better solution! 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


VijayP
Super User I
Super User I

@Balhemkan 

To get the desired result as shown in the picture follow the Video

VijayP_0-1614671487202.png

 

https://drive.google.com/file/d/1joxWn6FCWlXJ_SdVkZkOCZKUVUezvhti/view?usp=sharing




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


If we use this . Filter's are not working. Based on our selection we want top 5 and rest all in others

@Balhemkan 

In Filter which field you are adding. IF you add the Grouped column Filter works based on selected country! I think some more information is required to explain this




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


In filter I'm using country column. User don't want to see"other " In filter. So I'm using country column and based on that country top 5 highest countries

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.