Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am having some trouble by joining infos from diferent sources.
I have 3 different sources:
The first one comes from the data base and has 5 fields, which are:
ID,
Supplier,
Line,
Alocated,
Brand.
The second one comes from a excel spreadsheet and it has 2 fields:
Supplier,
Cluster_Supplier
The third one comes from a excel spreadsheet as well and it has 2 fields:
Line,
Cluster_Line
My goal is adding the field "Cluster" in the first table, by the rule:
if the value in the field "Alocated" (first table) equals to "not", then I look at the Brand (first table). if its value is "4", then the value must be 4. If its not 4, I get the value from the field "Cluster_Line".
If the value in the field Alocated is different of "not", then i get the value in the field "Cluster_Supplier".
Can anyone get me a script structure of how doing it
Note: not all the possible existing values of "Line" are registeres in the field.
Thx in advance!
The file I have is attached. I believe this join is the issue why I am having trouble in calculating the number of backlog activities.
Create 2 maps
a) Map1
Supplier,
Cluster_Supplier
b) Map2
Line,
Cluster_Line
And then when you´re loading your table
LOAD ID,
Supplier,
Line,
Alocated,
Brand,
If(Alocated = 'not',
If( Applymap('Map1',Supplier) = 4,4,
Applymap('Map2',Line))) as Cluster
Life saver!
?