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: 
venkatqlik_411
Contributor
Contributor

Reuse field data using Subroutines

Hi,

Please guide me on below issue.

 

Firsttable:

Load *,

If(Country='India' and Region='South','First',

 If(Country='Singapore' and Region='South','Second',

----------------------------------------)) as Newfield

from [lib://Qlikdev/data/facts/-----.qvd](qvd);

From the above table 

I want to reuse "Newfield" data where ever I want using subroutines.

 

1 Reply
edwin
Master II
Master II

did you mean a way to lookup Newfield?  you can either do a left join with a list of Country, Region, and Newfield

or do an applymap (you just need to concat Country and Region:
https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Scripting/MappingFunction...