Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
vpanchuda
Contributor III
Contributor III

Count Blank and show in KPI

I have a table with Dimensions as below and I Need to count blank in Action Plan Dimension and show it in a KPI, Can someone help me with Syntax, I am new to QLik Sense.

Please note it's blank it's NOT (---)

Target date Responsible RepAction Plan
01-12-2019 Renew
02-12-2019AJSwap
03-12-2019RM 
04-12-2019AJ 
05-12-2019  
06-12-2019VSRenew
07-12-2019 Close
08-12-2019VSClose
Labels (1)
7 Replies
tresB
Champion III
Champion III

Try like:
=Count(if(len(trim([Action Plan]))=0,[Action Plan])
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

I am not sure whether counting the [Action Plan] field will yield any results as you cannot count Null/Blank values. What you could try doing is counting the Target Dates where the Action Plan is Null (Length without spaces is 0). Try this: Count({<[Target date] = {"=Len(Trim([Action Plan]))=0"}>} [Target date])

If you want to use @tresB  's formula you can use:

=Count(if(len(trim([Action Plan]))=0,[Target date]))

Regards,

Mauritz

tresB
Champion III
Champion III


@Mauritz_SA wrote:

Hi there

.....you cannot count Null/Blank values...

Mauritz


Actually you can count real NULLs, using NullCount()

formosasol
Partner - Contributor III
Partner - Contributor III

NullCount - script function

NullCount() returns the number of NULL values aggregated in the expression, as defined by a group by clause.

Syntax: NullCount ( [ distinct ] expr)

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @tresB 

That's true, I was referring to the Count function - I guess capitalisation on my side would have made that clear.

@vpanchuda I just checked and you can use NullCount([Action Plan]) as a measure if they are real Nulls.

Regards,

Mauritz

vpanchuda
Contributor III
Contributor III
Author

It shows '0' as result , actually the cells are not filled (if the cells are left empty in the table are they real Nulls or Blank values??) i assume its blank values , if its blank is there any possible way to count it?
Mauritz_SA
Partner - Specialist
Partner - Specialist

The way I understand it, if there are blank values in the source table (or after a join) then they are real Nulls. I think it would be best to share a sample app 🙂