Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Vince_CH
Creator II
Creator II

Differentiation between fields values combined with letter and numbers

Hello friends, 

I have a list of field values like below,  I want to differentiate the yellow values from the grey ones, how shall the scripts or expressions should like? thanks in advance for the help. 

11.jpg

1 Solution

Accepted Solutions
Ivan_Bozov
Luminary
Luminary

Great, then maybe try this:

IF(MATCH(LEFT(YourField, 2), 'R8') OR MATCH(LEFT(YourField, 3), 'R14', 'R15'), 'Yellow', 'Gray') AS YourNewField
vizmind.eu

View solution in original post

3 Replies
Ivan_Bozov
Luminary
Luminary

I suppose this is not your full list, so what exactly differentiates these values? Do they always begin with R1 or R8? Is the length always 7 or 10 characters? Is it something else?

vizmind.eu
Vince_CH
Creator II
Creator II
Author

Hello Ivan, you gave me some hints here.

yes the yellow marked field value always starts with R8, or R14 or R15, so can i write like this in the scripts?

If (left(filedvalue,2)='R8' or left(filedvalue,3)={'R14' ,'R15'}, filedvalue) as YELLOW,

Best regards!

Vincent

Ivan_Bozov
Luminary
Luminary

Great, then maybe try this:

IF(MATCH(LEFT(YourField, 2), 'R8') OR MATCH(LEFT(YourField, 3), 'R14', 'R15'), 'Yellow', 'Gray') AS YourNewField
vizmind.eu

View solution in original post