Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a variable in my data called "Bus. Unit". There are 3 values business units - 10, 50 and 22. The variable is part of a larger spreadsheet that loads via data load editor.
I use this field as a selection filter in one of my Sense sheets, but would like to change the business unit values to more meaningful descriptor in the actual filter display, such as:
10 = 'apples'
50 = 'oranges'
20 = 'grapefruit'
How do I accomplish this? Do I add a command into the data load editor, or someplace else? What function do I use?
Thanks for your help!!!!!!
Mike
May be like this:
LOAD
Owner,
"PS #",
"Legacy #",
"Concept CD",
Pick(Match("Bus. Unit", 10, 50, 20), 'Apples', 'Oranges', 'Grapefruit') as "Bus. Unit",
"UM Status",
"Unit Location",
"Franchisee (If Applicable)",
"Address Line 1",
"Address Line 2",
City,
State,
Postal,
County,
Country,
Phone,
Fax,
Area,
Region,
"Region MGR",
"Region MGR Phone",
District,
"District MGR",
"District MGR Phone",
"DMA Name",
"DMA Description",
"General Manager",
"Distribution Center",
Latitude,
Longitude,
"Current Date Time",
"MBM ID",
F33
FROM [lib://PS_UNIT_MASTER_QUERIES (ckrcorp_msawyer)/Daily Unit Master Query.xls]
(biff, embedded labels, header is 1 lines, table is [Daily Unit Master Query$]);
What is your script right now??
Try ApplyMap function
Hi Sunny - thanks again for your response....
Here is the section of the script that loads this variable...
LOAD
Owner,
"PS #",
"Legacy #",
"Concept CD",
"Bus. Unit",
"UM Status",
"Unit Location",
"Franchisee (If Applicable)",
"Address Line 1",
"Address Line 2",
City,
State,
Postal,
County,
Country,
Phone,
Fax,
Area,
Region,
"Region MGR",
"Region MGR Phone",
District,
"District MGR",
"District MGR Phone",
"DMA Name",
"DMA Description",
"General Manager",
"Distribution Center",
Latitude,
Longitude,
"Current Date Time",
"MBM ID",
F33
FROM [lib://PS_UNIT_MASTER_QUERIES (ckrcorp_msawyer)/Daily Unit Master Query.xls]
(biff, embedded labels, header is 1 lines, table is [Daily Unit Master Query$]);
May be like this:
LOAD
Owner,
"PS #",
"Legacy #",
"Concept CD",
Pick(Match("Bus. Unit", 10, 50, 20), 'Apples', 'Oranges', 'Grapefruit') as "Bus. Unit",
"UM Status",
"Unit Location",
"Franchisee (If Applicable)",
"Address Line 1",
"Address Line 2",
City,
State,
Postal,
County,
Country,
Phone,
Fax,
Area,
Region,
"Region MGR",
"Region MGR Phone",
District,
"District MGR",
"District MGR Phone",
"DMA Name",
"DMA Description",
"General Manager",
"Distribution Center",
Latitude,
Longitude,
"Current Date Time",
"MBM ID",
F33
FROM [lib://PS_UNIT_MASTER_QUERIES (ckrcorp_msawyer)/Daily Unit Master Query.xls]
(biff, embedded labels, header is 1 lines, table is [Daily Unit Master Query$]);
Thank You, Sunni:
I get this error message:
Never mind - I think it works - I need to overwrite the previous Bus. Unit line...
Thanks!!!!
Well, the data loaded via the script, but the Filter Pane for this variable does not display any values - either old or new:
Can you share the values of Bus. Unit before the pick(match()) transformation?
Ok...here is a clip of the raw data:
I think I see the problem - formatted as text, with a leading zero...this will change the line in the data load editor?