Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Karl_Hart
Creator
Creator

ApplyMap not working

I can't understand why the following map isn't working. The mapping table has the right data, and the destination table creates the correct field, but it has null values. Any ideas?

DisablityMap:

Mapping Load "adisabil_cde",  

"adisabil_dsc"     ;

SQL SELECT *

FROM PUB."mis_adisabil";

Disability: LOAD "per_num",   

"adisabil_cde",   

ApplyMap('DisabilityMap', adisabil_cde, 'NONE') as [Person Disability],   

"aperdisabil_str_dat" as [Person Disability Start Date],   

"aperdisabil_end_dat" as [Person Disability End Date],   

"TimeStamp"   

where "aperdisabil_end_dat" > $(vToday) or len ("aperdisabil_end_dat") = 0;  

SQL SELECT *

FROM PUB."mis_aperdisabil";

STORE Disability into 10_QVDFiles\Disability.qvd;

Many thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

You have a typo in the Mapping table name: DisablityMap. Should be DisabilityMap.

Greatings.


Nicolai

View solution in original post

6 Replies
ali_hijazi
Partner - Master II
Partner - Master II

remove the double quotation marks around the field names

i think this is the only reason

make sure too that aperdisabil_end_dat"  and $(vToday) have the same format and I think you should use '$(vToday)'

I can walk on water when it freezes
tresesco
MVP
MVP

Perhaps the field is not being recognized without quotes. Put proper quotes and try like:

ApplyMap('DisabilityMap', "adisabil_cde", 'NONE') as [Person Disability],  

Karl_Hart
Creator
Creator
Author

Thanks for the heads up about the $9vToday), I'll look into it.

However, changing the quotation marks around the field name didn't affect the outcome of my initial query.

Thanks

Karl_Hart
Creator
Creator
Author

Thanks for the suggestion but it still gives the same result with the changes you suggested.

Anonymous
Not applicable

Hi

You have a typo in the Mapping table name: DisablityMap. Should be DisabilityMap.

Greatings.


Nicolai

Karl_Hart
Creator
Creator
Author

Thanks, I'm sure I checked that a million times but words were never my strong point.

Thanks.