Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping a respone to Null

Good morning.

I am new to Qlikview and need help with the following please.

I have data that reads

1-Female

2-Male

3-Not Answered

I have mapped the answers in a mapping spread sheet to display as

Female              

Male                  

Not Answered    

I have produced a graph that shows the percentage split for all of the answers which gives the following results

Female               53.51%

Male                   42.73%

Not Answered     3.75%

How do I ignore 'Not Answered' in my calculation please? Will setting the mapping spread sheet to the following work?

Header 1Header 2
1-Female

Female

2-MaleMale
3-Not Answered

Many thanks

Phil

1 Solution

Accepted Solutions
Not applicable
Author

=Count({ < Gender_SQ =- {'Not Answered'} > } Gender_SQ) 

This has worked perfectly.

Thanks you very much for your help. Very much appreciated.    

View solution in original post

8 Replies
oknotsen
Master III
Master III

I think excluding that value by using Set Analysis will do the trick.

Problem is that when you are really new to Qlik, Set Analysis might be a bit frustrating to figure out on your own. So I suggest you share with us the field names involved in this chart (so both the dimension and the expression) and we can try to give you an example of the Set Analysis statement based on those fields and expression.

May you live in interesting times!
Not applicable
Author

Thanks for the speedy reply. Is this what you require?

oknotsen
Master III
Master III

Might be .

Okay, I suggest you change your expression from...

count(Gender_SQ)

... to this...:

count( { < Gender_SQ =- {'Not Answered'} > } Gender_SQ)

I am not going to guarantee it works, but I hope it is a serious step in the right direction.

Please notice the use of single quotes and minus right after the equal sign.

May you live in interesting times!
Not applicable
Author

I am receiving the following error message when using

=Count{ < Gender_SQ =- {'Not Answered'} > } Gender_SQ)

quilldew
Creator
Creator

Hi Phil,

Assuming the field name containing the gender is Gender_SQ you could try

Count({$<[Gender_SQ]-={'Not Answered'}>}[Gender_SQ])

or if you still have the number prefixes

Count({$<[Gender_SQ]-={'3-Not Answered'}>}[Gender_SQ])


If the field name is 'Header 1' try


Count({$<[Header 1]-={'Not Answered'}>}[Gender_SQ])


Also instead of using a mapping table you could strip the first two characters on import of your table as an alternative. Not sure which would be faster.

quilldew
Creator
Creator

You have removed the first '(' . Place a '(' in front of the '{'.

oknotsen
Master III
Master III

There should be a ( before that { .

I noticed I forgot to do that myself after I posted. I edited my post, but I guess you jumped it before I was able to correct my mistake and you copied my mistake .

May you live in interesting times!
Not applicable
Author

=Count({ < Gender_SQ =- {'Not Answered'} > } Gender_SQ) 

This has worked perfectly.

Thanks you very much for your help. Very much appreciated.