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

Problem with nulls in applymap

Hello experts!

I've come across a problem I never have before.

In mapping load inline I have:

MapTable:
Mapping Load * inline [
status, status1
0,'bla'
1,'blabla'
2,'blablabla'
3,'blablablabla
4,'blablablablabla'
];

 

and in the table i have done: 

applymap('MapTable', status,'-')  as [status_of_field]

so as to also handle the null values.

In the database i can check that i have 306 null values but when i do

count({<[status_of_field]='-'>}row_id)  

I get the count of all the statuses of all the rows, when i only need the count of nulls.

What is wrong?

1 Solution

Accepted Solutions
sunny_talwar

Did you forget to add {} around '-'? Try this

Count({<[status_of_field] = {'-'}>} row_id)  

View solution in original post

3 Replies
sunny_talwar

Did you forget to add {} around '-'? Try this

Count({<[status_of_field] = {'-'}>} row_id)  

ioannagr
Creator III
Creator III
Author

Yes that was it , i thought i had written it correctly

sunny_talwar

Create a table box to view all the status_of_field with a key field to see how many do you see in there with '-'. You can also export the chart to Excel to count the number of '-' in Excel