Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Renomear resultado ou Alias em resultado de campo

Boa tarde, tenho um campo status que traz como resultado:

1

2

3

4

5

preciso renomear os resultados para:

Fechado

Aberto

Em Andamento

Concluído

Fechado

Como faço isso?

5 Replies
oscar_ortiz
Partner - Specialist
Partner - Specialist

It sounds like you need a cross reference table or a mapping table.

Something like this:

MAP_Codes:

Mapping

LOAD * INLINE [

    Code, Desc

    1, Fechado

    2, Aberto

    3, Em Andamento

    4, Concluído

    5, Fechado

];

MyTable:

LOAD

Field1,

Field2,

ApplyMap('MAP_Codes', [Field with Code]) as [Field with Desc]

Resident

TableName

;

Good luck

Oscar

Not applicable
Author

Ok, so it's like a join

oscar_ortiz
Partner - Specialist
Partner - Specialist

Yes, very similar to a left join.  Using the ApplyMap function you can also supply a third parameter, you can use that to supply a default value if you do not get a match.

MarcoWedel

maybe helpful:

Don't join - use Applymap instead

hope this helps

regards

Marco

MarcoWedel

another solution might be:

LOAD Pick(status,'Fechado','Aberto','Em Andamento','Concluído','Fechado')  as status

From YourSource;

regards

Marco