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

Announcements
Week 2: Presenting "Automate Sucess" and "Integration for Innovation" - WATCH NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
clondono
Creator III
Creator III

Null count in straight table

Hello,

I’m trying to get a COUNT of DISTINCT Projects with Tasks missing Facility Name.

I can get then listed correctly in the “Task Missing Facility Name” table using this expression:

=if(len(trim(TASK_FACILITY))=0, '**UNASSIGNED**', TASK_FACILITY)

It puts the **UNASSIGNED** text for TASK-FACILITY for all tasks missing the facility name.

The issue is when I try to “count” the number of projects with tasks missing facility names.

I’m using this formula:

Count(DISTINCT{$<Flag_NullTaskSeq = {"=NullCount(TASK_FACILITY)>0"}>}REQUEST_ID)


Which seems to work fine, but for some strange reason it doesn’t return the correct value for some PMs.

For example, no filters applied the PM listed below (D) is showing 1 project missing facility name ( which it is not correct).  If I select D as the responsible PM it changes to 0 which is the correct value.

i.jpg

Any ideas how to handle these null counts?

Thanks!

Message was edited by: Carlos Londono I'm including a sample file with 3 tables, the 2 upper tables return the correct results. When I combine the fields in the lower table (to export to NPrinting for a Pivot chart) one of the fields returns the wrong count. Any ideas on how to solve this issue? Thanks!

3 Replies
sunny_talwar

What happens if you use this:

Count(DISTINCT{$<Flag_NullTaskSeq = {"=Len(Trim((TASK_FACILITY))>0"}>}REQUEST_ID)

clondono
Creator III
Creator III
Author

Sunny using the expression you suggested returns zero for all counts

i.jpg

Anonymous
Not applicable

The Aggr() function may well help.