Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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
MVP
MVP

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
MVP
MVP

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.