Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

counting when 2 or 3 conditions are not null

Following from https://community.qlik.com/message/1377067?et=watches.email.thread#1377067

where

I had a table

1.PNG

and I would like to show only rows where 2 or 3 of the columns are not null (in other words to exclude rows with 2 or more null)

so expecting to see:

1.PNG

using Sunny's solution I am Now trying to count in a Text Object how many lines are matching 2 or 3 conditions - so how many are in the solution: here for example A+D+F+I+K = 5

so I will expect to see 5 in the text Object.

Any idea,

Thanks.

Raphael

1 Solution

Accepted Solutions
Highlighted

May be try this

=Count(DISTINCT If(RangeSum(If(Len(Trim(Cond1)) = 0, 1), If(Len(Trim(Cond2)) = 0, 1), If(Len(Trim(Cond3)) = 0, 1)) < 2, Letter))

or this

=Count(DISTINCT {<Letter = {"=RangeSum(If(Len(Trim(Cond1)) = 0, 1), If(Len(Trim(Cond2)) = 0, 1), If(Len(Trim(Cond3)) = 0, 1)) < 2"}>} Letter)

View solution in original post

3 Replies
Highlighted

May be try this

=Count(DISTINCT If(RangeSum(If(Len(Trim(Cond1)) = 0, 1), If(Len(Trim(Cond2)) = 0, 1), If(Len(Trim(Cond3)) = 0, 1)) < 2, Letter))

or this

=Count(DISTINCT {<Letter = {"=RangeSum(If(Len(Trim(Cond1)) = 0, 1), If(Len(Trim(Cond2)) = 0, 1), If(Len(Trim(Cond3)) = 0, 1)) < 2"}>} Letter)

View solution in original post

Highlighted
Creator III
Creator III

Both working perfect, many thanks

Highlighted

I would use the second expression if both of them works