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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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??

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

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]))

tresB
Champion III
Champion III

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.
tresB
Champion III
Champion III

Yeah, needs a correction. Try:

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