Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Create new field using if statement

Hi guys,

I have a field which has string values. I want to create a field flag if any of the values contain the word 'enter'.

[Location]

London,

singapore enter

china enter

enter Japan

India

Germany

This new field should seperate all values that do/dont have enter in them

Thanks,

Aaron

1 Solution

Accepted Solutions
Highlighted

How about this?

If(Index(Location,'enter'), Location) as Enter_Location

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

4 Replies
Highlighted
Creator II
Creator II

Hi Aaron

In your load script try if(match('enter ',' enter'),'Y','N') as Flag this way you will capture locations that have space before the word enter or after. If there is no space after the word just amend to 'enter'

Kindest regards

Brian

Highlighted

How about this?

If(Index(Location,'enter'), Location) as Enter_Location

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Highlighted
Creator III
Creator III

Hi Thanks for your response.

Where do i use the field [location]?

Highlighted
Champion III
Champion III

May be try this?

LOAD *,

           Location,

           IF(Wildmatch(Location, '*enter*') >0, Location) AS EnterLocation

FROM tablename;