Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
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
Qrishna
Master
Master

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
Partner - Specialist III
Partner - 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);

Qrishna
Master
Master

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