14 Replies Latest reply: Nov 14, 2016 3:00 AM by Anil Mahanty

# Set Analysis for Null and Not Null Values

Hi,

I'm trying to create a text object indicating the number of unassigned, open tickets. When I try to use this formula, I think that the \$- part of the set analysis is applying to both conditions that I've set, because the number is wildly inaccurate.

=count({\$-<actorname={'*'}, Status={'Open'}>} RequestID)

Another way I tried to do this was by subtracting the number of tickets with an open and not null actorname value from the total count of open tickets, but when I validated my data, I found that it wasn't working either. For that, I used this formula:

=count({<Status={'Open'}>} RequestID)-count({<actorname={'*'}, Status={'Open'}>} RequestID)

Is there a way to get the count of tickets with null actorname values which also have a status of 'Open'?

Thanks

• ###### Re: Set Analysis for Null and Not Null Values

Try

Count({<actorname-={*},Status={'Open'}>} RequestID

• ###### Re: Set Analysis for Null and Not Null Values

This formula gives me a result of 0.

• ###### Re: Set Analysis for Null and Not Null Values

I'm sorry, I forgot ')' at end of expression

• ###### Re: Set Analysis for Null and Not Null Values

Well nulls will never be part of the current selection, so you needs something like this:

=count({1<actorname -= {'*'}, Status={'Open'}>} RequestID)

or this:

=count({1<actorname -= {'*'}> * \$<Status={'Open'}>} RequestID)

If these do not work, I suggest you post your application or at least a sample  illustrating the problem.

• ###### Re: Set Analysis for Null and Not Null Values

you may be not having exactly null in your data base some time its blank. use len() function .

So use if(len(actorname)>0,count({\$<Status={'Open'}>}RequestID))

Thanks

BKC

• ###### Re: Set Analysis for Null and Not Null Values

try =count({\$-<actorname={'*'}> * <Status={'Open'}>} RequestID)

• ###### Re: Set Analysis for Null and Not Null Values

When I do this I get the same result as I did for the (count({\$-<actorname={'*'}, Status={'Open'}>} RequestID)) formula I tried earlier.

• ###### Re: Set Analysis for Null and Not Null Values

try like this

=if(isnull(actorname),count({\$<Status={'Open'}>}RequestID))

• ###### Re: Set Analysis for Null and Not Null Values

This is returning the total number of open tickets, but I don't think the null actor value is narrowing it down any further.

• ###### Re: Set Analysis for Null and Not Null Values

Count({<actorname-={"''"},Status={'Open'}>} RequestID)

or

Count({<actorname-={"'-'"},Status={'Open'}>} RequestID)

• ###### Re: Set Analysis for Null and Not Null Values

Thank you!

• ###### Re: Set Analysis for Null and Not Null Values

Hi, you can try using NullAsValue in your script as represented in the attached file.

I hope this helps.

JV !

• ###### Re: Set Analysis for Null and Not Null Values

This is working in QV 12, not in QV 11.

• ###### Re: Set Analysis for Null and Not Null Values

=count({1<actorname={"\$(Null())"},Status={'Open'}>} RequestID)