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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Null in set analysis

Good Day

=Count(DISTINCT{$<[Closing date]={"<=$(=Today(2))"} and [Candidate Name]={"null()"}>}Spec)

I am trying to write a code that will return number of specs where closing date is less than today and candidate name in empty,but the code above has errors,

Please advise how do i do it.

Thanks and Regards

Priscilla

5 Replies
sunny_talwar

Try this may be:

=Count(DISTINCT{$<[Closing date]={"<=$(=Today(2))"} and [Candidate Name]={"=Len(Trim([Candidate Name])) = 0"}>}Spec)

or

=Count(DISTINCT{$<[Closing date]={"<=$(=Today(2))"} and [Candidate Name]={"=IsNull([Candidate Name])"}>}Spec)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't select nulls. The best you can try is inversing a selection of anything not null:

=Count(DISTINCT{$<[Closing date]={"<=$(=Today(2))"} and [Candidate Name]=-{"*"}>}Spec).

But a better solution is to replace nulls with real values. See this document for more information: NULL handling in QlikView


talk is cheap, supply exceeds demand
settu_periasamy
Master III
Master III

or May be

=Count(DISTINCT{$<[Closing date]={"<=$(=Today(2))"},[Candidate Name]-={"*"}>}Spec)

Not applicable
Author

I did try this code but the and operator make the code to have an error, and I tried to remove the and operator and put a coma separator,but is is returning wrong results, it return 0,i want to see specs that are not submitted and for me to see that it is when the candidate Name field is emply,so i am counting empty field on my spred sheet

Not applicable
Author

the - operator makes this code to have an error but when i remove it,it only counts the number of empty cell on candidate name from the spread sheet not where the dates is less than today