Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
miranrai
Contributor III
Contributor III

Null value count by fields in table

I have a requirement to calculate the number of of null values per column wise of a particular table by company code.

Data is like:

(Table has 45-50 Columns)

CompanyLOCSuppGPR
1AUIx
1KI
2Dy
2F
3z

Result:

CompanyLOCSuppTAX
1101
2021
3110

is this possible in qlikview?

Please help.

8 Replies
Not applicable

You can use if(isnull(fieldname), 'NULL') while loading the table and then count NULL in the expression. Hope this helps.

miranrai
Contributor III
Contributor III
Author

i have already calculated null values while loading table.. I am not sure how to put it in formula.. when i put formula as

if($field='LOC' count(null_loc),

if($field='Supp' count(null_Supp), 0))

it gives me total no of null values in table. its not calculating by field.

sinanozdemir
Specialist III
Specialist III

Hi Mira,

I used set analysis:

Capture.PNG

I am also attaching the qvw.

prabhu0505
Specialist
Specialist

Dimension:

Company

Expressions:

NullCount(LOC)

NullCount(Supp)

NullCount(GPR)

should work.

prabhu0505
Specialist
Specialist

Set NullInterpret = '';

Set NullInterpret = ;

Forgot to mention, add this to your script.

Not applicable

I could be missing something and do not want to state the obvious, but on each expression tab, could you not select the radio buttom below Expression total and select the option to count either null or non-null counts?

sinanozdemir
Specialist III
Specialist III

I think that's for the total mode and it adds totals for the whole table:

Capture.PNG

prabhu0505
Specialist
Specialist

PFA.