To calculate the ranking shown in the Rank field, you need to use the RANK_UNIQUE function, which returns the unique rank of each value in a partition. You need to specify the expression as SUM([Sales]), which calculates the total sales for each product. You also need to specify the order as descending, which means that the highest sales will have the lowest rank. Finally, you need to specify the restart as every [Category], which means that the ranking will reset for each category. References: https://help.tableau.com/current/pro/desktop/en-us/functions_functions_tablecalculation.htm https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_rank.htm
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit