Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (47.2k points)

I am using Tableau 8.2.

I would like to sort, but I am having difficulty trying to get to my end result.

I have an item number: the item numbers are repeated multiple times. I have a criteria1 field and a criteria2 field.

I would like to experiment sorting on all the criteria1 fields, then all the criteria2 fields.

For my rows, I have "item number", "criteria1", "criteria2", along with other data. When I click above the "criteria1" in the list of rows, I get a "sort" function.

The sort function has severed different combinations:

The first is "sort order", there are clicks for "ascending" and "descending".

Next is "sort by", there are clicks for "data source order", "alphabetic" and "field". The "field" has a combobox for different field names.

The last group is for "manual". This shows all values, but not in true sort order.

I have tried using many different combinations for the sort, but cannot get it to work the way I would like. I would like a sort across all the items, descending.

How can I get the sort to sort descending across all the items, first by "criteria1"? Then, how can I sort by "criteria2"?

1 Answer

0 votes
by (17.6k points)
  • Let me explain how sorting works in Tableau, and you tell me what's happening in case it's not helpful.

  • Generally, Each dimension has a Sort property. In order to sort, you can right-click a dimension, Default Properties and Sort. Ascending or descending can be chosen to sort, on alphabetic, numeric or data source order. Or even by using manually sort top items come first, bottom items come last, use Up and Down buttons to shuffle

  • Tableau will automatically use that Sort Property when you drag those dimensions to the worksheet, Moreover, it will follow a hierarchy, the first dimension (in Row or Column) will be sorted first and then the second dimension will be sorted inside each bucket of the first dimension. SO, if you have a field with [A,B,C,D] and a second field with [1,2,3,4], one possible outcome could be (using descending order, first the letters than the numbers):

D   3

    2

    1

C   3

    2

B   4

    3

    1

A   4

    3

Related questions

0 votes
1 answer
0 votes
1 answer
asked Dec 19, 2020 in BI by Chris (11.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...