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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sort by expresion using wildcard

Is posible this?

In a Pie chart, I try to sort by expression using wildcard to replace character for values, if I do this works:

if(objec ='a-01-1',1,
if(objec ='a-02-2',2))


But if do this not work:

if(objec ='a-*-1',1,
if(objec ='a-*-2',2))

How I can use the wildcard?

Tks.

Labels (1)
3 Replies
Miguel_Angel_Baeyens

Hi Gerardo,

Use the WildMatch() function alone:

WildMatch(objec, 'a*1', 'a*2')

If the value is "a-01" then the function will return "1", if the value is "a02" the function will return "2". If the value is not in the list, the funtction will return "0".

Anyway, create a numeric field in the script to get better performance.

Hope that helps.

Miguel

swuehl
Champion III
Champion III

Try the string operator LIKE:

if(objec like 'a-*-1',1,

if(objec like 'a-*-2',2))

Anonymous
Not applicable
Author

Tks for the answers, with this information I can solve my problem.