Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor 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
Highlighted

Re: Counting Blank Cells

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
Highlighted

Re: Counting Blank Cells

May be this:

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

Highlighted
Contributor III

Re: Counting Blank Cells

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"}>} '')
Highlighted

Re: Counting Blank Cells

What is the name of this field?

Capture.PNG

Highlighted
Contributor III

Re: Counting Blank Cells

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.

Highlighted

Re: Counting Blank Cells

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?

Highlighted
Contributor III

Re: Counting Blank Cells

They are in the same table in Qlike Sense

Highlighted

Re: Counting Blank Cells

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

Highlighted
Contributor III

Re: Counting Blank Cells

Brings back all zeros     

Highlighted

Re: Counting Blank Cells

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