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

combine two columns in bar chart to make one

i need to combine null and unknown bars into one in bar chart

=if('ethnicity'='NULL' or 'ethnicity'='Unknown','Unknown)

i tried this but its not working. I dont know if I am putting it in the right place

8 Replies
maxgro
MVP
MVP


maybe with a calculated dim

=if(mixmatch(ethnicity, 'NULL',  'Unknown'), 'Unknown', ethnicity)

Not applicable
Author

why dont you assign Unknown text to all null values while loading the script ?

ex: if(len(trim(fieldname))=0,'Unknown',fieldname) as fieldname

or map using ..

Greg_Williams
Employee
Employee

isnull(<field name>) can be used in logic to test for null values.

Clever_Anjos
Employee
Employee

=if('ethnicity'='NULL' or 'ethnicity'='Unknown','Unknown) is comparing string

What´s name of your field?

Posting some data will help.


Clever_Anjos
Employee
Employee

Please check if this solve your problem

Not applicable
Author

the field name is Ethnicity. Null and Unknown in the field need to be combinedbar.png

Clever_Anjos
Employee
Employee

Please check the file I´ve attached

ashfaq_haseeb
Champion III
Champion III

Hi Vector

Answer is provided here in the below post.

http://community.qlik.com/message/557821#557821

Regards

ASHFAQ