Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I have a column that contains a string such as ABC; if the string matches 'ABC', then tag it as 'ABC' else ', Non-ABC'. I tried Wild Match and Found one of the functions but did not get the result I expected.
IF(WildMatch(DESC, '*ABC*'), 'ABC', 'Non ABC') AS IDENTIFIER
IF(
If(FindOneOf(DESC, 'ABC', ' ABC'), 1, 0) > 0,
'ABC',
'Non ABC'
) AS IDENTIFIER
Note: The patterns of the ABC in the column Desc is like 'ABC:-123456' , 'ABC- CA1234', 'ABC 12345', '12AC - ABC', 'CE-123ABC'. Appreciate your help on this.
Hi There,
I have fixed this. Earlier, I had another subquery to perform all sorts of conditions and join it back to the main table. I removed that subquery and used the condition in the QVD load itself, and now I can see that the condition is working correctly.
Hi
Your IF(WildMatch(DESC, '*ABC*'), 'ABC', 'Non ABC') AS IDENTIFIER should work as well as just simple IF(DESC like '*ABC*', 'ABC', 'Non ABC')
The question is in what scenario you noticed that your function did not work?
cheers
Hi There, Thanks for getting back.
I put the DESC column in to table chart and identifier as a filter when i applied the filter for Non ABC, i can still see the records which contains ABC.
what values were identified wrongly - can you share example?
I suggest to put just those 2 columns in the table, select Non ABC and give us a screenshot of the record which has ABC in it. Have you tried with the "like" function like i suggested?
cheers
Hi This is the actual code, in the WORD_DESC column if i see string matching TCS then tag it as Before Clash else After Clash Trying to attach the screen shot of the column, not sure if it gets uploaded here.
IF(WORD_DESC like '*TCS*', 'Before Clash', 'After Clash') as DEFECT_BEFORE_AFTER_CLASH_IDENTIFIER
This is how the column looks like after applying the filter, it still shows some of the records which contains string like TCS
Hi There, i have saved the data in to this excel file.
hard to say.
in your formula you are using WORD_DESC field in your chart you put some other field with label WO DESC. The reason I asked about the 2 fields you are using in your expression was to make sure you are not using similar fields which could be transformed. I am just trying to make sure you are not using different fields.
Also - you may as well try and copy text from the actual field just to make sure those TCS letters are not some special characters.
Otherwise I have no explanation. This is very odd and to be able to say more we would need to probably see your whole script and data model viewer. That would exclude situations where maybe you are (auto)concatenating some records or maybe your model is doing something what is causing incosistent results.
Hi There,
I have fixed this. Earlier, I had another subquery to perform all sorts of conditions and join it back to the main table. I removed that subquery and used the condition in the QVD load itself, and now I can see that the condition is working correctly.