
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apply Map Does NOT Work
so I try to associate "Yes" or "No" value to the dimension field of 'Connect_Key' by using apply map
what I have is
# Mapping_Table
Mapping Load
Connect_Key,
'YES' as Map_Value
From.....
#Fact_Table:
Load *,
applymap('# Mapping_Table',Connect_Key,'No') as Map_Value
From......
it ends up with all the value at Map_Value as "No". but I know there are should be some "Yes" there.
wondering if that is due to the 'YES' as Map_Value ...how can I fix this.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What type of data is in the connect_key field? Could it be a data type mismatch? Maybe apply the text function to them both to force them to be text?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's possibly a mismatch between the keys, like one value has leading/trailing blanks and the other does not. My approach to debugging this is to remove the mapping prefix to create a regular table and examine both sets of values in the Data Model Viewer or the UI.
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it looks like you don’t have the correct mapping table name in the applymap. I actually don’t know what # does to a Qlik table name, so I would just name the first mapping table as Mapping_Table. Then in the apply map your first parameter should match the mapping table name ‘Mapping_Table’ including the single quotes.
I think that may be the cause.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry...that was a careless typo......but other than that, everything looks ok ,right ...should return me Yes if the value at Fact table matches the key at Mapping_Table ...otherwise, no right? but all I get is No....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What type of data is in the connect_key field? Could it be a data type mismatch? Maybe apply the text function to them both to force them to be text?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
where is the mapping table getting its data from ?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's possibly a mismatch between the keys, like one value has leading/trailing blanks and the other does not. My approach to debugging this is to remove the mapping prefix to create a regular table and examine both sets of values in the Data Model Viewer or the UI.
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yeah...sort of ...it turns our the one key is numeric/integer and the other is text.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that is the reason. one key is numeric and the other is integer
