Discussion Board for collaboration on QlikView Scripting.
Is there a way in the script to rename records based on values. i.e. in the field 'Type', I want any 1 to equal 'Private', 2 to equal 'General', etc.
Go to Solution.
Did you add semi-colon ( after ] at the end?
LOAD * Inline [
Have a look at the ApplyMap() function.
This Blog Post Joins and Lookups explains it as well as a few other things.
You can do it this way:
If([Type]=1, 'Private', If([Type]=2, 'General', [Type])) As [Type]
Hope it helps.
Pick(Match(Type, 'Private', 'General'), 1, 2) as NewType
Use an ApplyMap function
First, load the table with the from/to columns
Mapping load * inline [
ApplyMap('FromTo', Type, 'Default Value') as Type,
None of these are working unfortunately.
It tells me that it does not recognize the 'Type' field when I apply these methods. Any other thoughts?
Is it working when loading "Type" field without transformations?
So you don't have a field called Type. What is the name of the field that contains Private, General etc?
Can you post your script?
I guess this thread is related to your previous thread: Count total of 1s, 2s, 3s, 4s, and 5s in single expression
So maybe you are having a field [Type of PII] instead you could use in those expressions?
hope this helps