Discussion board where members can get started with QlikView.
I am wondering how to change the values of data in a field, through the script editor.
I import data from a spreadsheet currently and one of the fields is 'Group RM' and has lets say 10 values in it:
However I want to reduce to 5 overall, so i am left with 1,2,3,4 and OLD. Can I do this?
I can't quite get my head round that. I can't find how to attach a file so have inserted a table for context, basically of the list of names I would like to combine Fok Chow, Group, GROUP MISC, Hibbs (Group), Ingledew, King, Lawlor and Mostert together and call it 'Sundry'. I currrently do this in Excel but really need to know how to do it within QV.
While loading the data, just edit your GRM field itself or create a New GRM field)
If(Match(GRM, 'Fok Chow', 'Hibbs', 'Ingledew', ....), 'Sundry', GRM) as [New GRM]
If you have variations of name then you might be able to worksomething out with WildMatch
If(WildMatch(GRM, '*Fok Chow*', '*Hibbs*', '*Ingledew*', ....), 'Sundry', GRM) as [New GRM]
use a mapping load
mapping load * inline
applymap('map',GRM,'NA') as group
I have attached the file I was using as a test.
In the list box are all the values that are pulled in for the GRM field, and on the right are the correct values. All values in the list box that are not one of the correct values, must be changed to Sundry (bottom of right list). I hope this makes sense.
Hopefully you guys can help through the file and thankyou for your time,
Applymap would be the way to go with this. I appreciate you are very new, so it is probably worth you have a read of this
As that will help your understanding on the function.
Hope that helps