Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Specifying a specific ordering of values in table

Hi all,

I have a column (e.g. field_A), which has 4 unique values.

Field_A                        freq

-----------                        -----

Value_s                        4

Value_x                        3

Value_y                        7

Value_r                        2

I want to display this field in a straight table with a freq (which I can do) but I want to order field_A values in a specific order (not in ascending or descending) that I would like to define manually.

Any ideas?

Regards

Revlin

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You should be able to use an expression to return your sort order (i.e. a numerical) in sort tab of the straight table, maybe something like

=match(Field_A, 'Value_s','Value_x','Value_y','Value_r')

View solution in original post

5 Replies
Not applicable
Author

specify the load order for fieldA using a inline load. In the sort order use expression and specify the new field.

Like:

Load * Inline[

Field_A,SortOrder

Value_s,2

Value_x,3

Value_y,1

Value_r,4

];

Kiran Rokkam.

swuehl
MVP
MVP

You should be able to use an expression to return your sort order (i.e. a numerical) in sort tab of the straight table, maybe something like

=match(Field_A, 'Value_s','Value_x','Value_y','Value_r')

Not applicable
Author

Hi

I think

=match(Field_A, 'Value_s','Value_x','Value_y','Value_r')

is the way to go but it doesn't seem to work.

swuehl
MVP
MVP

This should work, please check attached sample.

Field_A has to be your field name you want to sort, with the values the exact field values (all case sensitive).

Not applicable
Author

Actually it does it work, thank you.