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

how to add nulls in a table

Hi all,

I need help as I want to diplay the amount of nulls in a chart but it doesn´t work and I think I could do it before.

To double check I have nulls in the database, I created a raw table and I see there are nulls in the customer_country field:

Captura de pantalla 2024-04-17 a las 14.03.07.png

 then, I have this table

Captura de pantalla 2024-04-17 a las 14.05.36.png

 

An these are the settings: 

Captura de pantalla 2024-04-17 a las 14.06.52.png

I want the Nulls to be included as a name in the country column, and their percentage and number of nulls in the other columns. I click in the include nulls box and nothing happens now. It added just the number of Nulls to the total, and it doesn't even do it anymore. I think I solved this in the past constructing the table from scratch, but it doesn't work anymore.

 

Any thoughts?

Labels (2)
2 Replies
igoralcantara
Partner - Creator II
Partner - Creator II

in the load script, add this field when you're loading the table:

isNull(customer_country) * -1 As CountryNullFlag

In the UI, just SUM this field and you're good.

----
datavoyagers.net
BrunPierre
Partner - Master
Partner - Master

Hi, If I got that correctly then replace customer_country with one of these options:

Coalesce(customer_country, 'Nulls') as customer_country

or

If(Len(Trim(customer_country)), customer_country, 'Nulls') as customer_country

By doing so, you would be able to directly select all values and define them within a set analysis:

{<customer_country={"Nulls"}>}