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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Correct Expression help please?


HI,

I need to calculate the count of ID which have Scheduledate where Scheduledate not equal to NULL.

can anyone help me with expression

I used below expression but it seems not getting data correct values

If(Scheduledate,Count(Distinct(ID)))

1 Solution

Accepted Solutions
Not applicable
Author

Can you try:

Count(Distinct {<Scheduledate={"$(= '>=' & Today() & '<=' & Today())"}>}ID )


THanks



View solution in original post

14 Replies
Nicole-Smith

Try:

Count({<Scheduledate={'*'}>}Distinct ID)

Or:

Count({<Scheduledate={'?*'}>}Distinct ID)

Clever_Anjos
Employee
Employee

Maybe

Count(Distinct {<Scheduledate={">01/01/1900"}>}ID )

can help you

Not applicable
Author

Thanks. I missed here one thing. Actually I need to get the count of IDs whihc have Scheduledate morethan date

i,e today the date is 25/02/2014. I need to show the count of IDs where Scheduledate> 25/02/2014. like the very same way if I pull the report suppose on 28/02/2014 I need to show count of IDs where Scheduledate> 28/02/2014

Is it possible?

MK_QSL
MVP
MVP

=COUNT{<Scheduledate -= {''}>}DISTINCT ID)

Nicole-Smith

Clever Anjos's response should solve that.

Clever_Anjos
Employee
Employee

Count(Distinct {<Scheduledate={">25/02/2014"}>}ID )

mvanlutterveld
Partner - Creator II
Partner - Creator II

Hi,

I would solve this by using a flagfield and set analysis:

Script: If(Isnull(ScheduleDate,0,1)        as FlagScheduleDate

Expression: Count({<FlagScheduleDate  = {1} >} ID)

If you have a 1:1 relationship between schedule date and ID ánd the ID's are distinct, you can also use Sum(FlagScheduleDate) as an expression.

Cheers,

Michiel

Not applicable
Author

Thanks. when I used this it is showing garbage after expression "{"

Not applicable
Author

may be the expression is

If(Isnull(ScheduleDate),0,1) as there is a typo mistake in your expression in above reply