Forum Discussion
Pie Chart - Top 5 - Rest named Other without count from data table
need to show Top 5 from pei chart and rest named others. i saw the plenty of solutions. But my data source is diffrent . There is no numeric (count) column.
fields are ProjectID and Product Components.
| ProjectID | Prod Component |
| 1 | A |
| 1 | B |
| 1 | C |
| 2 | D |
| 3 | A |
| 3 | B |
| 3 | D |
I had to keep this format cause i this pie chart is one visual out of main dashboard. so i have filters and when clicking filters this chart should be change accordingly. Is there any way to show top 5 using this format?had to keep project ID to create connection between tables. If i convert to prod componet with count column it doest change when i clicking slicers.
PBIX File:
https://drive.google.com/file/d/13V8zVc8fWhdDVmykIyS5Fm0XQ6v68k_v/view?usp=sharing
please have a look on this. Here i both teams and product pie chart changing accordingly when i click quaters. But when i create product by count its doesnot change. The thing is to show TopN i need to table with count.
Hi, Anonymous
You can try the following method without the product count table.
Measure:
Count Product = COUNT('product'[Product])At this point the pie chart will change with the choice of quarter.
Rank = RANKX(ALLEXCEPT('product','product'[RM]),[Count Product],,DESC,Skip)Suppose you only want to show the values of the first 3 in the pie chart.
Measure = IF([Rank]<3,1,0)Is this the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-zhangti
Community Support
Hi, Anonymous
You can try the following method without the product count table.
Measure:
Count Product = COUNT('product'[Product])At this point the pie chart will change with the choice of quarter.
Rank = RANKX(ALLEXCEPT('product','product'[RM]),[Count Product],,DESC,Skip)Suppose you only want to show the values of the first 3 in the pie chart.
Measure = IF([Rank]<3,1,0)Is this the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
No i need to show top N and rest should be show as "Others". lets say i need to show topN and all others should be displayed as "Others"