Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ajit_aarya
Contributor II
Contributor II

using match and wildmatch for a expression (Nested if syntax)

state names location
CA John  
OR james  

AZ

Alexis  
CA Matys  
OR AJ  
CA Steve  
CA Hanes  

 

I want location from states CA and OR whose name is ends with ____S and ___N

= If(match(State,'CA','OR', and (WildMatch(name,'????S,'???N')), location))

I tried this 

Labels (1)
3 Replies
sidhiq91
Specialist II
Specialist II

@ajit_aarya Please see below and it resolves your issue then like and accept as solution.

NoConcatenate
Temp:
Load *
where not isnull(Location);

Load *,
if(match(state,'CA','OR') and wildmatch(names,'*s','*n'),state)as Location;

Load * Inline [
state,names
CA, John
OR, james
AZ, Alexis
CA, Matys
OR, AJ
CA, Steve
CA, Hanes

];

Exit Script;

ajit_aarya
Contributor II
Contributor II
Author

Data already exists , I just need the syntax to perform in chart, i just want to fetch the specified values in different fields to locate.

 

And another question can we label the expression ??

For example,  If(match( State,'CA','OR','WA'),state) can i name or label as west region in the syntax??

sidhiq91
Specialist II
Specialist II

@ajit_aarya  Regarding your first question, I am not able to understand very clearly. Could you please elaborate or provide some sample on input and expected output.

For 2nd question, you can definitely label the Dimension as 'west region'.