Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
hammermill21
Not applicable

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
Not applicable

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])

14 Replies
sunny_talwar
Not applicable

Re: Counting Blank Cells

May be this:

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

hammermill21
Not applicable

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"}>} '')
sunny_talwar
Not applicable

Re: Counting Blank Cells

What is the name of this field?

Capture.PNG

hammermill21
Not applicable

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.

sunny_talwar
Not applicable

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?

hammermill21
Not applicable

Re: Counting Blank Cells

They are in the same table in Qlike Sense

sunny_talwar
Not applicable

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

hammermill21
Not applicable

Re: Counting Blank Cells

Brings back all zeros     

sunny_talwar
Not applicable

Re: Counting Blank Cells

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