Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Samuel
Contributor
Contributor

NullCount() returns 1

Recently I noticed QlikView behavior that drawn my attention. Consider the following code:

Men:
LOAD

	Id as Men.Id,
	Id as Key.Id,
	Name as Men.Name
	
INLINE [

	'Id', 'Name'
	'1', 'Arthur'

];

Women:
LOAD

	Id as Women.Id,
	Id as Key.Id,
	Name as Women.Name

INLINE [

	'Id', 'Name'
	'1', 'Elizabeth'
	'2', 'Amanda'

];

Elizabeth is a lucky woman while Amanda was left with no partner. This leads to interesting consequence. After loading this script, with no selections, "NullCount(Women.Id)" will return "0" while "NullCount(Men.Id)" will return "1". Can someone explain me why, in this scenario, chart expressions finds row of NULLs in "Men" table?

Labels (1)
2 Replies
marcus_sommer

I think the reason is that nullcount() is an aggregation-function and needs a dimension against the calculation could be performed - within the script-load it are the fields within the group by statement and within the UI it takes the key-fields from the table it belongs to.

- Marcus

ckarras22
Partner - Creator
Partner - Creator

Hello,

The "issue" appears from the load script. As it is your script, there is an implicit outer join, therefore although at the Symbol table level (Men) you haven't any nulls, at the "Table" level you have. This is apparent in your  chart.

 

BR

Christos K.