Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Applmap() does not bring correct results in some instances

Hi all,

I am familiar with the function but have encountered one strange issue with the ApplyMap function I like a lot. Suddenly it does not link correctly two exactly the same values in the mapping load and load fact for some lines. For example, if I check values created I get this:

CodeFile

"AB-1234" "Description 1234"

"AC-4321" "Description 4321"

Fact

ApplyMap('CodeFile', 'AB-1234', '<Empty>') returns Description BUT ApplyMap('CodeFile', 'AC-4321', '<Empty>') returns <Empty>.

I need to say that those CodeFiles and Facts are loaded into one QV table from the year dependent tables, i.e. CodeFile11 and CodeFile12 and Fact11 and Fact12. I tried to include Year into to key but then it didn't work at all. I've also tried to use text() and trim(text()) but no luck.


I am still on the version 9 SR4.

Thanks for ideas,

Nenad

1 Solution

Accepted Solutions
Not applicable
Author

Do not bother. I've sorted it out

As I have two for...next loops I had to add a Year variable to the name of the mapping loads. For example: mapping load Other_Map$(Y)$(vC): and then add a Year into the key like here '$(Y)-$(vC)-'&Field1 as OtherID, and then use the same notation in the ApplyMap function, applymap('Other_Map$(Y)$(vC)', '$(Y)-$(vC)-'&Field2, '<Empty>')

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi Nenad,

Two quick questions: is there any chance that fact or codefile tables are being concatented implicitly but unexpectedly? And this leads to the second: is there any change that there is more than one description for one given CodeFile?

Hope that helps.

Miguel

Not applicable
Author

Do not bother. I've sorted it out

As I have two for...next loops I had to add a Year variable to the name of the mapping loads. For example: mapping load Other_Map$(Y)$(vC): and then add a Year into the key like here '$(Y)-$(vC)-'&Field1 as OtherID, and then use the same notation in the ApplyMap function, applymap('Other_Map$(Y)$(vC)', '$(Y)-$(vC)-'&Field2, '<Empty>')