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: 
pascos88
Creator II
Creator II

ApplyMap with SubField

Hello,

It is possible to use ApplyMap and inside Sub field?

I need somethings like this

MAP_TURBINE:

Mapping load * inline [

Turbine, NormTurb

WTG01, E1

WTG02, E2

WTG03, E3

WTG04, E4

WTG05, E5

WTG06, E6

];

ApplyMap('MAP_TURBINE', SubField(FileBaseName(),'_',4) then NormTurb, SubField(FileBaseName(),'_',4)  as Turbine;

I know that the script is wrong, but I want if SubField(FileBaseName(),'_',4) = WTG01 or WTG02 ... or WTG06 so I need to rename in NormTurb.


Thanks for any help

Pasquale

2 Replies
marcus_sommer

Maybe in this way:

ApplyMap('MAP_TURBINE',

     if(match(SubField(FileBaseName(),'_',4), WTG01, WTG02, ..., WTG06),           NormTurb, SubField(FileBaseName(),'_',4)), 'ApplyMapDefaultValueForNotFound')  as Turbine;

- Marcus

ysj
Creator
Creator