Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

qlikconsultant
Contributor II

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
MVP
MVP

Re: Problem with an complex if clausel

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

3 Replies
Not applicable

Re: Problem with an complex if clausel

Hallo Markus,

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

Perhaps the problem is there.

Ciao

Klaus

MVP
MVP

Re: Problem with an complex if clausel

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

jonbrough
Valued Contributor

Re: Problem with an complex if clausel

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

Community Browser