Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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.

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
MVP
MVP

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.