Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator 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
jonathandienst
Partner - Champion III
Partner - Champion III

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
Kohli
Creator II
Creator II
Author

In Script

Anonymous
Not applicable

Hi,

try Below If Condition.

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

find the attached App

Anonymous
Not applicable

Hi,

PFA attached Sample

Regards

Ritesh

sewialwork
Partner - Contributor III
Partner - Contributor III

Try this in your script

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

AGB