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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
davinfrost
Contributor III
Contributor III

count and isnull

hi guys,
there is null value in So Number Edit
and i have to count So Number Edit

 

if i use this : 

='Total So Edit'&' = '&count(distinct [So Number Edit])
& ' Total Invoice = '&Count(DISTINCT([Total SO No]))

it will get null value,

i want it without null value ..

what should i do??

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Yeah, needs a correction. Try:

=count( {<[So Number Edit]={"=len(trim([So Number Edit]))>0 "} >} distinct [So Number Edit])

View solution in original post

5 Replies
saar_lorena
Contributor III
Contributor III

Hi,

 

Try this:

In your script, first you need to check when is null or not.

So:

LOAD *, If(IsNull([So Number Edit]), 'T', 'F') as SoNumberEditIsItNull;

 

='Total So Edit'&' = '& If([SoNumberEditIsItNull]='T', count(distinct [SoNumberEditIsItNull])

davinfrost
Contributor III
Contributor III
Author

hi , i want to count all status edit, but i dont want to count null data '-'

xxxxxxx.jpg

i want use this on textbox, i used this on chart, but it isnt work on textbox? 

=If(len(trim([So Number Edit]))='0','0',count(distinct[So Number Edit]))

tresesco
MVP
MVP

Try using set analysis like:

=count( {<[So Number Edit]={"=len(trim([So Number Edit]))>0 "  >} distinct [So Number Edit])

davinfrost
Contributor III
Contributor III
Author

error in set modifier ad hoc element list.
tresesco
MVP
MVP

Yeah, needs a correction. Try:

=count( {<[So Number Edit]={"=len(trim([So Number Edit]))>0 "} >} distinct [So Number Edit])