Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Please visit COVID-19 group to keep up the discussion. GO TO GROUP
Highlighted
Contributor II

Create a new field from the Existing fields...

I have below table.

Flight                               stop type        Origin        Stop place         Destinatiom

7031MXPFCOADD
7371IAHDENSFO
5071BKKKHIMCT
15781LAXIAHBOS

 

555/558CNXKTMSIFKTM
557/560CNXKTMSIFKTM
207/614CNXDARZNZDAR
103/118CNXDARZNZDAR
117/106CNXDARZNZDAR

I want create a new field Flight Destination from the Existing fields. If Stop Point=1, I want Flight Destination= Destination Field records,

or  stoptype= CNX, i want Flight destination= Stop place filed records. I want output records like...

Flight Destination  (NEW COLUMN)

ADD

SFO

MCT

BOS

SIF

SIF

ZNZ

ZNZ

ZNZ

5 Replies
Highlighted
MVP
MVP

Re: Create a new field from the Existing fields...

Do you want to do this in the load script or in the front end?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Contributor II

Re: Create a new field from the Existing fields...

In Script

Partner
Partner

Re: Create a new field from the Existing fields...

Hi,

try Below If Condition.

if( [stop type]=1,Destination,if([stop type]='CNX', [Stop place]) ) as  NewField;

find the attached App

Highlighted
Contributor

Re: Create a new field from the Existing fields...

Hi,

PFA attached Sample

Regards

Ritesh

Highlighted
Partner
Partner

Re: Create a new field from the Existing fields...

Try this in your script

If([ stop type]=1,[Destinatiom],[Stop place]) as [Flight Destination]

AGB