Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to take count of a field but excluding the nulls ,
how to do that in set analysis expression?
May be like this-
Add in your script-
if(not IsNull(ID) and not IsNull(Date),1,0) as newfield
You can use this flag in front end.
so den in front end I shud use something like ,
count(newfield={"1"})
?
which will exclude the null values?
No,
if(not IsNull(ID) and not IsNull(Date),1,0) as newfield
Here, 1 means Not null and 0 means null vaues.
So you expression will be-
Count({<newfield={1}>}ID) //Not Considering Null Values
but I also have a case where I need to take a count of my date field(there is only one field) excluding the null values,
so how to do that in script or set analysis?
Not understood. Count of date field means? or You want to count ID based on Date field?
no,
its just that I need to take count(date field ) only ,but excluding the null values
Create a two flags. One for your ID and one for your date.
May be try this as Neha suggested:
if(not IsNull(ID) ,1,0) as IDCount
if(not IsNull(Date),1,0) as DateCount
Not sure if this is what you are looking for?
so on front end I need to show the count of this field ,
how to do in set analysis
=count({<DateCount={'1'}>}DateCount) ,will this do?
It should did you check?