Skip to main content
Announcements
Meet the 2024 Qlik Luminaries and Partner Ambassadors! READ ON!
cancel
Showing results for 
Search instead for 
Did you mean: 
mattdt1811
Contributor III
Contributor III

If Statement with Match and Left

Hi All,

I am trying to tidy up our data field for [NAME OF CONTACT]  as some records start with numbers and symbols.

I have tried using the below but it has not worked.

if(Match(Left([NAME OF CONTACT]),1)('1','2','3','+','#'),'N/A', [NAME OF CONTACT]) as [Main Contact],

Would someone be able to give me the correct expression?

Alternatively if some is able to give me the script for if left,1 is not ABCDEFG........ , N/A , [MAIN CONTACT] that would be even better.

Thank you.

Labels (4)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

For your first approach, Should be

if(Match(Left([NAME OF CONTACT],1),'1','2','3','+','#'),'N/A', [NAME OF CONTACT]) as [Main Contact]

Second option, you want to get as below

If(Not FindOneOf(Left([NAME OF CONTACT],1),'ABCDEFG'), 'N/A', [MAIN CONTACT])

 

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

1 Reply
Anil_Babu_Samineni

For your first approach, Should be

if(Match(Left([NAME OF CONTACT],1),'1','2','3','+','#'),'N/A', [NAME OF CONTACT]) as [Main Contact]

Second option, you want to get as below

If(Not FindOneOf(Left([NAME OF CONTACT],1),'ABCDEFG'), 'N/A', [MAIN CONTACT])

 

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)