Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this map in load script:
INVENTTRANS:
LOAD *,
ApplyMap('WAC_MAP',LINK_WAC) AS WAC
from $(VStore)INVENTTRANS_WAC.qvd (qvd);
I would like to applymap only if the field is numeric is it possible?
You might need another ) after your first ApplyMap like this:
If(IsNum(ApplyMap('WAC_MAP',LINK_WAC)), ApplyMap('WAC_MAP',LINK_WAC) ,TARIFAREFERENCIAL) as WAC
HTH
Best,
S
Hi Eduard, you can use the IsNum() function, ie:
If(IsNum(LINK_WAC, ApplyMap('WAC_MAP',LINK_WAC) [,InstructionsIfNotIsNumeric]) as WAC
Hi Eduard,
the other option you have is to ensure only numerical values are present in your applymap itself, then that is only what will be mapped when you use it
hope that helps
Joe
If your mapping load table doesn't have a mapping available for certain LINK_WAC the default value will be LINK_WAC unless you specify another default value. Take a look at the image below:
HTH
Best,
S
Hi Ruben,
I did but it returns this error:
Error in expression:
IsNum takes 1 parameter
INVENTTRANS:
LOAD *,
If(IsNum(ApplyMap('WAC_MAP',LINK_WAC), ApplyMap('WAC_MAP',LINK_WAC) ,TARIFAREFERENCIAL) as WAC
from E:\Data BI\Documents\QVD\INVENTTRANS_WAC.qvd (qvd)
Many thank's
You might need another ) after your first ApplyMap like this:
If(IsNum(ApplyMap('WAC_MAP',LINK_WAC)), ApplyMap('WAC_MAP',LINK_WAC) ,TARIFAREFERENCIAL) as WAC
HTH
Best,
S
Many many thank's Ruben