Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

rename field values

how to rename field values while loading or after loading the table, which these values are shared between two other filed values.

Whenever I click Peter then i should see only shift 1, the shift 2 should be renamed to shift1 and the end result should be (i.e count should be 2)

please find attached file and sample data.

john

1 Solution

Accepted Solutions
krishna_2644
Specialist III
Specialist III

By using match function u can get your desired output.

Capture1.PNG

LOAD Person,

    if(match(Person,'Peter'),'Shift1',Type) as Type,

    Hrs

FROM

(ooxml, embedded labels, table is Sheet1);

View solution in original post

3 Replies
ramoncova06
Specialist III
Specialist III

how do you define which user gets what value ?

once you define that, you could use a mapping to assigning the values

mapping

shiftmapping:

LOAD Person,

     Type,

FROM

(ooxml, embedded labels, table is Sheet1);

LOAD Person,

     applymap('shiftmapping',Type) as Type,

     Hrs

FROM

(ooxml, embedded labels, table is Sheet1);

krishna_2644
Specialist III
Specialist III

By using match function u can get your desired output.

Capture1.PNG

LOAD Person,

    if(match(Person,'Peter'),'Shift1',Type) as Type,

    Hrs

FROM

(ooxml, embedded labels, table is Sheet1);

Anonymous
Not applicable
Author

Tnx Krishna & Ramon