
Creator III
2018-03-06
09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Script question: How to create a field with values based on another field in the same table?
Hello,
I have the following field:
Country:
Australia
Brazil
China
France
UK
US
From the country field above I want to create a Country2 field.
Country2 field values should be:
Australia
UK
US
How can I create this field most efficiently please in the script?
- Tags:
- qlikview_scripting
546 Views
4 Replies

Champion
2018-03-06
09:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
ok for the second field Country2, but the question here is how you want it to be linked to the first field ?
447 Views

Creator III
2018-03-06
09:56 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Both of the fields will be in the same table.
I just want Australia, UK, US for Country2 if they are present in the Country field.
447 Views


MVP
2018-03-06
05:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why?
447 Views


Contributor III
2018-03-06
06:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
I think its possible with If statement,but you may need to hard code the country name.
If (Country = 'UK' or Country = 'US' or Country = 'Australia',Country) as Country2
Regards,
Binu
447 Views
