Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create another Column in script

I have this table,

  

TYPEDATE_01DATE_02
AType AType B
BType AType B
AType AType B
BType AType B
BType AType B
BType AType B
AType AType B
AType AType B

and i want to create a new column DATE_03 when if ([TYPE]="A";[DATE_01];[DATE_02])

This would result table

TYPEDATE_01DATE_02DATE_03
AType AType BType A
BType AType BType B
AType AType BType A
BType AType BType B
BType AType BType B
BType AType BType B
AType AType BType A
AType AType BType A
1 Reply
sunny_talwar

May be this:

LOAD TYPE,

          DATE_01,

          DATE_02,

          If(TYPE = 'A', DATE_01, DATE_02) as DATE_03

FROM source;