Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Fields

Hi,

I have a easy example regarding to my problem. You will see a table which includes Start and End. Now the ID should counted when Start and End is not empty. How to build that?

Thanks...

4 Replies
sunny_talwar

Try this:

=Count(if(Len(Trim(Start)) > 0 AND Len(Trim(End)) > 0, ID))

rubenmarin

Hi Hans, you can use:

=Count({<End={"=Len(Trim(End))>0"}, Start={"=Len(Trim(Start))>0"}>} ID)

​=Count({<ID={"=Len(Trim(End))>0 and Len(Trim(Start))>0"}>} ID)

Btw the empty fields aren't Null(), they have a blank value.

You can check when a value is null because you can't select it, in this case you can select the blank value.

avinashelite

try this:

=count({<Start={"=if(len(trim(Start))>0 ,Start)"},End={"=if(len(trim(End))>0 ,End)"}>}ID)

tresesco
MVP
MVP

=Count( If( not (IsNull(End) and IsNull(Start)), ID))

In your sample End and Start are not really null, so try:

=Count( If( Len(Trim(End))>0 and  Len(Trim(Start))>0, ID))

You could you set analysis as well.