Prakhar Gajbhiye
Prakhar Gajbhiye

Reputation: 80

How to order/sort a calculated field dimension in Tableau server?

I have a calculated field Income. The content of Income is :

IF return_app_account__Income < 10000
THEN "<10k"

ELSE IF return_app_account__Income < 15000
THEN "10-<15k"

ELSE IF return_app_account__Income < 30000
THEN "15-<30k"

ELSE IF return_app_account__Income < 50000
THEN "30-<50k"

ELSE IF return_app_account__Income < 100000
THEN "50-<100k"

ELSE "100k+"
END

Income is a dimension and I wanted to see percentages of total records fits in each category. I got this when I put Income against Number of Records.

Income vs Number of Records

One can see the rows are not in order i.e. <10k is at the bottom but it should be on top most row. I tried sort ascending and sort descending options but it does not make the rows in order. How to sort the rows in right order i.e <10k then 10-<15k then 15-<30k then 30-50k then 50-<100k then 100k+ ?

Upvotes: 1

Views: 3044

Answers (1)

wavery
wavery

Reputation: 279

By Custom sort I mean Manual sort. If you click on the field you want to sort on in the worksheet (in this case income) and in the dropdown menu you have sort and click on it and you will get this (example): Manual Sort Example

Upvotes: 1

Related Questions