Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

How can i write an expression with if statement, applymap and left() / right() functions?

Hi guys,

attached is a sample data file (is a personal/desktop) edition.

The output i want to obtain is the following:

if field5 = 0,  the first 5 number of field4 and the last two of the same field.

applymap and left() / right () functions can coexist?

Thanks,

Mattia

Labels (4)
1 Solution

Accepted Solutions
Highlighted

May be this

If([FIELD5] = 0, Left(ApplyMap('KEY_TO_FIELD4', [FIELD2], 'n/a'), 7) & ',' & Right(ApplyMap('KEY_TO_FIELD4', [FIELD2], 'n/a'), 2)) as New_Field

View solution in original post

1 Reply
Highlighted

May be this

If([FIELD5] = 0, Left(ApplyMap('KEY_TO_FIELD4', [FIELD2], 'n/a'), 7) & ',' & Right(ApplyMap('KEY_TO_FIELD4', [FIELD2], 'n/a'), 2)) as New_Field

View solution in original post