Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
johnjustus
Contributor III
Contributor III

Straight Table - Custom Sort Order

Hi All,

I have a sorting question in the straight table.

The data is like this in the straight table.

Name                                                  Owner

# of Dealing Authorities                       Keen

# of Compliants                                   Keen

# of Breaks                                          Lobato

# of  Lates                                             John

# of  Calls                                           Lobato

# of   Incoming                                   John

# of   Outgoing                                    Keen

I want to the table to be sorted as below

Name                                                  Owner

# of Dealing Authorities                       Keen

# of  Outgoing                                     Keen

# of Compliants                                   Keen

# of Breaks                                          Lobato

# of  Calls                                           Lobato

# of   Incoming                                   John

# of  Lates                                           John

Is the above possible? Is there an Custom Sort Order available on the Name column?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

You just need this...

Match(Name, '# of Dealing Authorities', '# of  Outgoing', '# of Compliants', '# of Breaks', '# of  Calls', '# of   Incoming', '# of  Lates')

If is not needed

View solution in original post

7 Replies
sunny_talwar

Sure, you can use Match function

Match(Name, '# of Dealing Authorities', '# of  Outgoing', '# of Compliants', '# of Breaks', '# of  Calls', '# of   Incoming', '# of  Lates')

johnjustus
Contributor III
Contributor III
Author

Thanks

I tried like this and did not work

Straight table Chart Properties -> Sort -> Columns -> Name -> Sort by Expression

If(Match(Name, '# of Dealing Authorities', '# of  Outgoing', '# of Compliants', '# of Breaks', '# of  Calls', '# of   Incoming', '# of  Lates'),Name)

Am I doing anything wrong?

Thanks

sunny_talwar

You just need this...

Match(Name, '# of Dealing Authorities', '# of  Outgoing', '# of Compliants', '# of Breaks', '# of  Calls', '# of   Incoming', '# of  Lates')

If is not needed

johnjustus
Contributor III
Contributor III
Author

Yes, I realized that.

That's a good solution. Thanks

ziadm
Specialist
Specialist

Hi use Dual and Mapping

MapNameSort:

Mapping

LOAD * Inline [

Name,Order

# of Dealing Authorities,1

# of Outgoing,2

# of Compliants,3

# of Breaks,4

# of Calls,5

# of Incoming,6

# of Lates,  7

];

Table1:

load Dual(Name,ApplyMap('MapNameSort',Name)) as Name,

Owner;

load * Inline [

Name,                                                  Owner

# of Dealing Authorities,                       Keen

# of Compliants,                                   Keen

# of Breaks,                                          Lobato

# of Lates,                                             John

# of Calls,                                           Lobato

# of Incoming,                                   John

# of Outgoing,                                    Keen ];

after that sort by the Name in Ascending order in your chart or Table

Robertmccarthy2
Contributor
Contributor

what if "is" is needed? 

Robertmccarthy2
Contributor
Contributor

What if "is" is needed?