### Question

How to group by Rank Percentile without using Table Calculation.**<IMAGE>**

KNOWLEDGE BASE

How to group by Rank Percentile without using Table Calculation.**<IMAGE>**

- Tableau Desktop

ex) Group A : 1.0 ~ 0.8

Group B : 0.8 ~ 0.6

Group C : 0.6 ~ 0.4

Group D : 0.4 ~ 0.2

Group E : 0.2 ~ 0.0

1. Connect to Sample Superstore.

2. Drag [State/Province] to Rows and [Sales] to Text on Marks.

3. Create a new calculated field as following.

Name : Percentile_0.2

Calculation : {FIXED :Percentile({FIXED [State/Province]:SUM([Sales])},0.2)}

4. Create a new calculated field as following.

Name : Percentile_0.4

Calculation : {FIXED :Percentile({FIXED [State/Province]:SUM([Sales])},0.4)}

5. Create a new calculated field as following.

Name : Percentile_0.6

Calculation : {FIXED :Percentile({FIXED [State/Province]:SUM([Sales])},0.6)}

6. Create a new calculated field as following.

Name : Percentile_0.8

Calculation : {FIXED :Percentile({FIXED [State/Province]:SUM([Sales])},0.8)}

7. Create a new calculated field as following.

Name : Group by Sales Percentile

Calculation :IF SUM([Sales])>=SUM([Percentile_0.8])

THEN "Group A"

ELSEIF SUM([Sales]) >= SUM([Percentile_0.6]) AND SUM([Sales]) < SUM([Percentile_0.8])

THEN "Group B"

ELSEIF SUM([Sales]) >= SUM([Percentile_0.4]) AND SUM([Sales]) < SUM([Percentile_0.6])

THEN "Group C"

ELSEIF SUM([Sales]) >= SUM([Percentile_0.2]) AND SUM([Sales]) < SUM([Percentile_0.4])

THEN "Group D"

ELSE "Group E"

END

8. Drag [Group by Sales Percentile] to left the of [State/Province] on Rows.

9. Right click on [State/Province] -> Sort -> Set as following.

Thank you for providing your feedback on the effectiveness of the article.

Open new Case

Continue Searching

Knowledge Base

Community

Product Help

Training and Tutorials