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: 
rkpatelqlikview
Creator III
Creator III

How to generate one new column across three stages

Hi,

Please find the attached sample data. Please suggest on this.

There are 3 stages. from that stages i need to generate one new column that FinalPerson as shown in excel.

Thanks for your support.

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

this is one way to do it

PFA

View solution in original post

4 Replies
YoussefBelloum
Champion
Champion

Hi,

this is one way to do it

PFA

rkpatelqlikview
Creator III
Creator III
Author

Thansk for your great help Youssef.

rkpatelqlikview
Creator III
Creator III
Author

Thanks for your great help Youssef.

rkpatelqlikview
Creator III
Creator III
Author

Hi Youssef,

The same scenario but D1 is having Level2,D2 is having Level3,D3 is having Level4. then I should take this data in to one field after if any empty cells it should take the data from DriverName after that there is a another level even if its nits still empty it shioud give

Vehicle Number.

Can i get this with same script, I used it in my back end? 

LOAD

      if(len(trim(D1))<>0 and (len(trim(D2))=0 or Len(trim(D2))='Level3') and (len(trim(D3 ))=0 or len(trim(D3 ))='Level4'), D1, 

      if((len(trim(D1))=0 or len(trim(D1))= 'Level2')  and len(trim(D2))<>0 and (len(trim(D3 ))=0 or len(trim(D3 ))='Level4'), D2,

      if((len(trim(D1))=0 or len(trim(D1))= 'Level2') and (len(trim(D2))=0 or Len(trim(D2))='Level3')  and len(trim(D3 ))<>0, D3

      ))) as Driver,      

    D3

    D2,

     D1,

     Key2,

     Datums,

    VehicleNumber ,

     [Driver Name]

   

FROM

(qvd);