Pie Chart with Ranking and Others in Web Intelligence
Pie Chart with Ranking and Others in Web Intelligence:
Pie chart always display total out of 100. And if you have ranking (that is restricting few rows) then it will not depict the actual or correct data unless you add the rest of ranking fact/numbers (Others) to the chart.
Let’s take sample data:
Requirement is to show top 3 Ethnicity, Percentage in a 100% pie chart.
For calculating percentage I created a measure variable with the following definition
PercentageVar =[Total]/NoFilter(Sum([Total]))In Report
After applying top 3 ranking:
Note: Applied percentage formatting to Percentage column
As you see the total percentage is not 100%. That’s the reason business requested for adding others and make it 100%.
If i create the pie chart on this above it will not consider the “Others” contribution. In order make pie chart 100% it is necessary to bring “Others” into consideration like
Steps to follow:
Create measure variable
RankVar =Rank([PercentageVar];[Ethnicity]) In ([Ethnicity])
Create detail variable by associating dimension [Ethnicity]
TopVar =If([RankVar]<4;[Ethnicity];”Others”) In ([Ethnicity])
Create pie chart with [TopVar] and [PercentageVar] variables.
Apply descending sorting on [PercentageVar]
Hope it helps!!