Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
New-Qlik
Creator III
Creator III

How to create a column from multiple column

Hello Everyone ,

Table2:
Load
Purcahse_id,
Name,
Location,
If("Price US" = 'ZYZ', 'Good', 'Bad') as "Price US Status",
If("Price AU" = 'ZYZ', 'Good', 'Bad') as "Price AU Status",
If(Description= 'ZYZ', 'Good', 'Bad') as "Description Status",
If(Code <= '***', 'Good', 'Bad') as "Code Status ",


Resident
Table 1

i need all the status reason in one field example
Status and in that all the above defined status should come as Price Status,Description Status , Code status etc

TIA

1 Solution

Accepted Solutions
sunny_talwar

Have you looked into The Crosstable Load 

Table2:
CrossTable(Status_Type, Status, 3)
LOAD Purcahse_id,
     Name,
     Location,
     If("Price US" = 'ZYZ', 'Good', 'Bad') as "Price US Status",
     If("Price AU" = 'ZYZ', 'Good', 'Bad') as "Price AU Status",
     If(Description= 'ZYZ', 'Good', 'Bad') as "Description Status",
     If(Code <= '***', 'Good', 'Bad') as "Code Status ",

View solution in original post

4 Replies
sunny_talwar

Have you looked into The Crosstable Load 

Table2:
CrossTable(Status_Type, Status, 3)
LOAD Purcahse_id,
     Name,
     Location,
     If("Price US" = 'ZYZ', 'Good', 'Bad') as "Price US Status",
     If("Price AU" = 'ZYZ', 'Good', 'Bad') as "Price AU Status",
     If(Description= 'ZYZ', 'Good', 'Bad') as "Description Status",
     If(Code <= '***', 'Good', 'Bad') as "Code Status ",
New-Qlik
Creator III
Creator III
Author

I tried using it but it is duplicating data. i have 20-30 columns in load statement and if i write 

Crosstable(status_type, status) or

crosstable(status_type, status,3)

 

sunny_talwar

Duplicating data? Can you share an example where we can see the issue?

New-Qlik
Creator III
Creator III
Author

It was not duplicate rows , its just no of rows are increased which is obvious thing when u create tale.