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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Lucky1
Creator
Creator

How to sort by symbols in table

Hi

I have Country acronyms like this

US.FR

US.MGE

US.NF

US.OC

US-IL.IDFP

US.CBO

US.CM

US.DTC

US.FINR

 

I want to sort this by . and - and alphabetics.I want my output like 

US.CBO

US.CM

US.DTC

US.FINR

US.FR

US.MGE

US.NF

US.OC

US-IL.IDFP

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

I've changed the logic slightly, bold below 

 

Load
Ticker
,if(index(Ticker ,'-'),2,1)&Ord(upper(Ticker))&Ord(coalesce(subfield(upper(Ticker),'-',2),subfield(upper(Ticker),'.',2))) as Ticker_Sort_Order
inline [
Ticker
US.FR
US.MGE
US.NF
US.OC
US-IL.IDFP
US.CBO
US.CM
US.DTC
US.FINR
];

 

vinieme12_0-1686555160024.png

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
rubenmarin

Hi, go into edit mode, select the table, in the properties panel on the right select sort, move the dimension to the first, un check automatic and select the option to sort alphabetic

rubenmarin_0-1686382382257.png

 

ally.

vinieme12
Champion III
Champion III

I've changed the logic slightly, bold below 

 

Load
Ticker
,if(index(Ticker ,'-'),2,1)&Ord(upper(Ticker))&Ord(coalesce(subfield(upper(Ticker),'-',2),subfield(upper(Ticker),'.',2))) as Ticker_Sort_Order
inline [
Ticker
US.FR
US.MGE
US.NF
US.OC
US-IL.IDFP
US.CBO
US.CM
US.DTC
US.FINR
];

 

vinieme12_0-1686555160024.png

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.