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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sravan_v007
Partner - Contributor III
Partner - Contributor III

Creating New Columns

Hi All,

I am getting data from DB as below

NumberRoleCountryName
1CoreUKKumar
1CoreUSVennu
1Non-CoreChinaPavan
1Non-CoreUAERohith
1Register OwnerIndiaSravan
2CoreUKKumar
2Non-CoreUSVennu
2Non-CoreChinaPavan
2Register OwnerUSRohith

 

From above data i have to derive new fields and values for those fields are based on Role =  'Register Owner' like below

NumberRoleCountryNameRegister NameRegister Country
1CoreUKKumarSravanIndia
1CoreUSVennuSravanIndia
1Non-CoreChinaPavanSravanIndia
1Non-CoreUAERohithSravanIndia
1Register OwnerIndiaSravanSravanIndia
2CoreUKKumarRohithUS
2Non-CoreUSVennuRohithUS
2Non-CoreChinaPavanRohithUS
2Register OwnerUSRohithRohithUS

 

I need to archive this in Qlik Sense Backend. Appreciate your help.  

1 Solution

Accepted Solutions
tresesco
MVP
MVP

This will not be a cross join. To remove confusion you can replace join with inner/left join. In the above script, Number is your key field.

View solution in original post

3 Replies
tresesco
MVP
MVP

One solution could be like:

t1:
LOAD Number,
     Role,
     Country,
     Name
FROM
[https://community.qlik.com/t5/App-Development/Creating-New-Columns/td-p/1833445]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);

Join
Load
     Number,
     Name as [Register Name],
     Country as [Register Country]
Resident t1 where Role='Register Owner';

tresesco_0-1630647371108.png

 

sravan_v007
Partner - Contributor III
Partner - Contributor III
Author

Hi.. Thanks for the replay..

But, this will be a cross join and my data set is huge... I am worried it never gets refreshed.

 

tresesco
MVP
MVP

This will not be a cross join. To remove confusion you can replace join with inner/left join. In the above script, Number is your key field.