Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikview community
how can I analyze a selection at the selection set for specific sequence of letters? As an example, please see screenshot:
Scenario 1: 100 is selected.
--> 3 values are determined. Has any one string the letter 'a' , so in the output text is displayed: Letter found 'a'!
Scenario 2: 500 is selected:
--> the possible selection (Essen) Has no letter 'a'. In this case, is to be displayed the letter 'a' does not exist!
This seems to work for me:
=if(index(concat(City),'a')>=1,'Present','Not Present')
Where 'City' is the field / dimension you're looking across. Switch 'a' for a variable and it becomes even more flexible, also the above is case sensitive so stick an upper() function round both elements to make non-case sensitive and of course an isnull() function could also be used.
Hope that helps,
Matt - Visual Analytics Ltd
This seems to work for me:
=if(index(concat(City),'a')>=1,'Present','Not Present')
Where 'City' is the field / dimension you're looking across. Switch 'a' for a variable and it becomes even more flexible, also the above is case sensitive so stick an upper() function round both elements to make non-case sensitive and of course an isnull() function could also be used.
Hope that helps,
Matt - Visual Analytics Ltd
Hi Onur,
I don't know what's your requirement behind this but it's more difficult to check if anyone of the selected values contains 'a'.
You could do it in an another way by having an associated table:
LOAD * INLINE [
City, A_Flag
Augsburg, 1
Berlin, 0
Chemnitz, 0
Frankfurt, 1
];
..and than summarize over the A_Flag field.
- Ralf
..to explain this more:
=if(sum(A_Flag) / count(distinct City) = 1, 'Letter found: a!', 'Letter a does not exist!')
- Ralf
thank you both !