Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exluding one value in apply Map

Hi Friends,

I am using apply map function to recognise the sales type.

I have use three columns x ,y, z to identify which sales type it is.

So  X Y Z

      1 2 1

       2 1 3

       4 5 7

The problem is the combinations of X and Y are less. But the Z can take any value excluding ZERO (0).

So How to exclude 0 from my z value. Should I write all the values for z also. there are hundred in Numbers.

Thanks

Pavan


6 Replies
ali_hijazi
Partner - Master II
Partner - Master II

can you elaborate more

the mapping table should take only 2 columns

is this your mapping table or your data table?

I can walk on water when it freezes
sujeetsingh
Master III
Master III

Can you post a more detailed script.

As per my level of knowledge you can use conditional resident load after apply map

Load

X,Y,Applymap('MapTable',ID,Z) as Z

where Applymap('MapTable',ID,Z)<>0

Not applicable
Author

Thanks

But I want values where only Z is not equal to Zero and ID can take any values.

puttemans
Specialist
Specialist

What if you concatenate X & Y first, then create the mapping table, with the addition 'where Z <> 0'

Not applicable
Author

Hi Johan,

can you Please sample code

puttemans
Specialist
Specialist

Hi Pavan,

If your aim is to use the example you gave for mapping, then it should look like :

Map_Salestype:

MAPPING LOAD

X&'|'&Y as XY,

Z
RESIDENT (yourprevious table)

WHERE Z <> 0;

In the table where you want to use the mapping table, you then need to create the XY variable the same way before applying the map. Else it won't work.

Regards,