Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
micheledenardi
Specialist II
Specialist II

Applymap with dynamic table name

Hi guys,

is there a way to use a field (in my case "Dim3" ) as teble name during an applymap() ?

I know that the table name must be enclosed by single quote but there is anybody which know any trick ?

I want to avoid join or concatenate solutions...

Dim1Dim2Dim3Value1
AAAMappingTable11
BBBMappingTable22
CCCMappingTable33
DDDMappingTable44
EEEMappingTable55
FFFMappingTable66
Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
5 Replies
sunny_talwar

Do you have a sample where we can test this out?

jmvilaplanap
Specialist
Specialist

Hi

You can define the table name as a variable with LET LET and SET

But I need a sample to see exactly what are you thinking to do.

Regards

micheledenardi
Specialist II
Specialist II
Author

I've attached the sample data

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

I guess not what you would like, but your best bet is this

FactTable:

LOAD Dim1,

    Dim2,

    Dim3,

    Value1,

    Pick(KeepChar(Dim2, '0123456789'),

    ApplyMap('MappingTable1', Dim2),

    ApplyMap('MappingTable2', Dim2),

    ApplyMap('MappingTable3', Dim2),

    ApplyMap('MappingTable4', Dim2),

    ApplyMap('MappingTable5', Dim2),

    ApplyMap('MappingTable6', Dim2)) as MappedValue2

FROM

[..\..\Downloads\SampleData.xlsx]

(ooxml, embedded labels, table is Foglio1);

micheledenardi
Specialist II
Specialist II
Author

Hi Sunny,

thanks for you solution but i want to avoid fixed table name.

I have found this thread Qlik Tips: Dynamic ApplyMap but this approach do not work for me... i've tried in both qlikview and qliksense but when the script execution arrive at the applymap qlik is freezing.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.