Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
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
Specialist III
Specialist III

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