KNOWLEDGE BASE

Showing Pie Chart By Ranking Categories


Published: 06 May 2020
Last Modified Date: 11 May 2020

Question

How to make pie chart by ranking categories (Example: Rank employees by Salary in categories)

Environment

  • Tableau Desktop

Answer

1. Chose the Mark Type as Pie and drag Sum(Salary) to Size and Angle on marks card
2. Calculate Rank by formula RANK(SUM([Salary]),'desc')
3. Use Employee Name in detail
4. Calculate Rank partition by following formula:
IF [Rank] <= 10 THEN "Top 10"
ELSEIF [Rank] <= 20 THEN "Top 20"
ELSE "Others"
END

5. Drag Rank partition to color on Marks card
6. Sort Emp name in Ascending order by Salary with an aggregation of Sum

 
Did this article resolve the issue?