Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
mr_novice
Creator II
Creator II

if statement with many "greater than" conditions.

Hello all!

I have an if statement that works fine:

IF(

     C0>C1

AND C0>C2

AND C0>C3

AND C0>C4

......

AND C0>C10

,1,0)

Do you have any suggestions of how to write this in a shorter way?

Cant do a rangemax(C0,.....,C10)=C0 because sometimes C0=C1 (or other) and the condition is not correct.

Any suggestions?

Br

Cris

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like:

If( C0>RangeMax(C1,C2,...C10), 1,0)

View solution in original post

3 Replies
tresesco
MVP
MVP

May be like:

If( C0>RangeMax(C1,C2,...C10), 1,0)

View solution in original post

mr_novice
Creator II
Creator II
Author

This works! I didn't think of this. Haha.

But. My condition with C0>C1.... will also give me a 0 when one of the values is null(). Is there a way of taking care of null values?

tresesco
MVP
MVP

Yes, you may try like:

If( C0>RangeMax(C1,C2,...C10) OR IsNull(C1+C2+...C10), 1,0)