Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

Counting Blank Cells

Hello,

I have data that has blanks in the Inspection Bar code section and I want to be able to get a count of those that are blank. I tried:

count({<[Inspection Bar Code]={" "}>}[Inspection Bar Code]) and it does not seem to be working.

I have attached a pic of the data that is being pulled into Qlik Sense Server.

Thank you!!

1 Solution

Accepted Solutions
sunny_talwar

Since you mentioned script, why don't you create a flag in the script

If(Len(Trim([Inspection Bar Code])) = 0, 1, 0) as NullFlag

and then use this in your expression

Count({<NullFlag = {1}>} [Firex Monthly Inspection Key])

View solution in original post

15 Replies
sunny_talwar

May be this:

Count({<ID = {"=Len(Trim([Inspection Bar Code])) = 0"}>} ID)

hammermill21
Creator III
Creator III
Author

Hey Sunny,

I tried something like that but I don't have an "ID" field. I tried this also

Count({<[Inspection Bar Code] = {"=Len(Trim([Inspection Bar Code])) = 0"}>} '')
sunny_talwar

What is the name of this field?

Capture.PNG

hammermill21
Creator III
Creator III
Author

Firex Monthly INspection Key, which I tried also:

Count({<[Firex Monthly Inspection Key] = {"=Len(Trim([Inspection Bar Code])) = 0"}>} [Firex Monthly Inspection Key])

But it returns 0 count when I have 10 that are blank.

sunny_talwar

Are these two fields: [Firex Monthly Inspection Key] and [Inspection Bar Code] resides in two different tables in the backend of your application or are they from the same underlying QlikView table?

hammermill21
Creator III
Creator III
Author

They are in the same table in Qlike Sense

sunny_talwar

May be create a table object with

Dimension

[Firex Monthly Inspection Key]

Expression

=If(Len(Trim([Inspection Bar Code])) = 0, 1, 0)


See if this table shows any 1s or all 0s

hammermill21
Creator III
Creator III
Author

Brings back all zeros     

sunny_talwar

Is [Firex Monthly Inspection Key] unique key to the table or is there another field which is unique?