Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Problem with an complex if clausel

I have the following Data:

DateTimeDirectSearchIDOriginColorTimeStamp
31.05.201223:29101205310883DEblau31.05.2012 23:29:30
31.05.201223:29101206010001DEblau31.05.2012 23:29:30
31.05.201223:2900 DEnone31.05.2012 23:29:13
31.05.201223:2900 DEnone31.05.2012 23:29:24
31.05.201223:2900 DEnone31.05.2012 23:29:02
31.05.201223:2900 DEnone31.05.2012 23:29:03
31.05.201223:2901 DEred31.05.2012 23:29:03
31.05.201223:2900 DEnone31.05.2012 23:29:09
31.05.201223:2900 DEnone31.05.2012 23:29:13
31.05.201223:2901 0DEred31.05.2012 23:29:27
31.05.201223:2901 DEblau31.05.2012 23:29:34
31.05.201223:2910 DEred31.05.2012 23:29:51
31.05.201223:2901 DEblau31.05.2012 23:29:54
31.05.201223:2900 DEnone31.05.2012 23:29:56
31.05.201223:2900 DEnone31.05.2012 23:29:58

I want the following:

I use a chart table to count the following:

if ( ID<>0 and isnull(ID)=0 and(Direct=1 or Search=1),count(ID) ,0)

dimension is date and time. The result from that example should be 2 but I get 0. Any idea what I doing wrong?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You'll need to embed the condition in the aggregation, not the other way round:

=count( if ( ID<>0 and isnull(ID)=0 and(Direct=1 or Search=1),ID))

View solution in original post

3 Replies
Not applicable

Hallo Markus,

could you display the ID and Count(ID) in the table?

Perhaps the problem is there.

Ciao

Klaus

swuehl
MVP
MVP

You'll need to embed the condition in the aggregation, not the other way round:

=count( if ( ID<>0 and isnull(ID)=0 and(Direct=1 or Search=1),ID))

Anonymous
Not applicable

is this a case of conductig your tests across the whole set of data, as opposed to at the level of datapoints ?

Try something like:

   count(if ( ID<>0 and isnull(ID)=0 and(Direct=1 or Search=1),ID)

Jonathan