Discussion board where members can learn more about Qlik Sense App Development and Usage.
Hi community,
I'd like to flag if the string of one column appear in an other column and count them in KPI, something like that (in the visual mode)
ID | DepartmentA | DepartmentB | flag |
---|---|---|---|
1 | Ain | xxxxAinxxx | ok |
2 | xxxxxxxxxxx | nok | |
3 | Garonne | xxxxxxxxxx | nok |
4 | Aveyron | xxxxAveyron | ok |
5 | |||
... |
I tried :
--> If(WildMatch(DepartmentA,'*'&DepartmentB&'*'),'Ok','nOK') as Flag
--> If(Substringcount(DepartmentA,'*'&DepartmentB&'*')<>1,'Ok','nOK') as Flag
--> If(WildMatch('*'&DepartmentA&'*',DepartmentB),'Ok','nOK') as Flag
--> If(Substringcount('*'&DepartmentA&'*',DepartmentB)<>1,'Ok','nOK') as Flag
--> If(WildMatch('*'&DepartmentA&'*','*'&DepartmentB&'*'),'Ok','nOK') as Flag
--> If(Substringcount('*'&DepartmentA&'*','*'&DepartmentB&'*')<>1,'Ok','nOK') as Flag
Without success...
Do you have an idea ?
Thanks !
Try this.
Load *,If(Substringcount(DepartmentB,DepartmentA)=1,'Ok','nOK') as FLag
From xyz;
Regards,
Kaushik Solanki
Hi Kaushik Solanki,
Thks for your answer
unfo with your formula the Flag ok appear only if DepartmentB=DepartmentA....
Hello,
You can use the Wildmatch function
-> So in you case
if(WildMatch(DepartmentB, '*'&DepartmentA&'*'),'OK','NOK')
Regards
something like
if(Match(DepartmentA,'*DepartmentB*','OK')