Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlickySense
Creator
Creator

Mapsubstring/Map does not work on set analysis

Hello,

I have got a table for mapping 

AntibioticValues:

MAPPING

LOAD * INLINE [

In, Out

1,Sensitive

2,Resistant

3,Intermediate
];

 

It works very good with MAP USING; when the variable is  just put on simple count/sum, however when I use set expression in expression for this chart, the mapping is not accurate - it completely loses some entries like 1 which supposed to be Sensitive

One more question: When I change mapping table name, I can still use old name in MAP USING function and it works, however qlik does not see this table at all and I can't drop it by drop table function. How to remove that?

Labels (2)
3 Replies
Or
MVP
MVP

I'm a bit confused here - set analysis is only used in chart expressions. Mapping is only used in script syntax. As far as I know, they can't be combined. What exactly is it that you're doing here?

QlickySense
Creator
Creator
Author

Got Variable A which got values from 1 to 4. Client wants to observe only 1-3 values, 4 is not necessary, therefore I use set analysis for this variable count ( { <VariableA = {1,2,3}>} Variable A). Now I got exactly 1,2,3 values but they represent something which is

1,Sensitive

2,Resistant

3,Intermediate

I want to label them appropriately and while this Mapping works while I have just count(Variable A) and renames 1 to Sensitive, it does not work when I have set analysis as expression

 

Moreover, if I rename mapping table, I can still MAP using previous table name and Qlik couldn't find this table because I wanted to drop table PreviousTableName. I don't want this

Austyn
Contributor
Contributor


@QlickySense wrote:

Got Variable A which got values from 1 to 4. Client wants to observe only 1-3 values, 4 is not necessary, therefore I use set analysis for this variable count ( { <VariableA = {1,2,3}>} Variable A). Now I got exactly 1,2,3 values but they represent something which is

1,Sensitive

2,Resistant

3,Intermediate

I want to label them appropriately and while this Mapping works while I have just count(Variable A) and renames 1 to Sensitive, it does not work when I have set analysis as expression mcdvoice

 

Moreover, if I rename mapping table, I can still MAP using previous table name and Qlik couldn't find this table because I wanted to drop table PreviousTableName. I don't want this


Moreover, we will look at mapping functions with syntax. We use the mapping functions for managing and working with mapping tables. Usually, we use the mapping tables in BI tools such as QlikView and Qlik Sense to map or replace field values or field names at the time of script execution. Basically, there are two Qlik Sense Mapping Functions, which we use in data load script, ApplyMap() and MapSubstring() function.