Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to write a simple IF statement that says if the calculated value is negative, then display the value as 0. Otherwise complete the expression. In Excel, the if statement would look something like this:
if A>B,A-B,0
How would I create this in QlikView?
Hi, to avoid the if(), you can use range functions like rangemax
Ex.
rangemax(A-B,0)
So, if A-B > 0, the result will be (A-B), else if the result is negative, the result will be 0
Rgds
From the help:
The three parameters condition, then and else are all expressions. The first one, condition, is interpreted logically. The two other ones, then and else, can be of any type. They should preferably be of the same type. If condition is true, the function returns the value of the expression then. If condition is false, the function returns the value of the expression else.
if( Amount>= 0, 'OK', 'Alarm' )
In your case
=if( Amount>= 0, Amount, 0)
Hi, to avoid the if(), you can use range functions like rangemax
Ex.
rangemax(A-B,0)
So, if A-B > 0, the result will be (A-B), else if the result is negative, the result will be 0
Rgds
These answers were each helpful in different situations. Thank you SO much for taking the time to point me in the right direction. I'll be bookmarking this thread for sure.
Hi,
I'm trying to create the following dimension and is not working
=If(count( distinct if( INSTANCIA > 0 , [LastModified.autoCalendar.Date]))>4,'Yes','No')
any suggestion?
Thanks in advance,
Joan
Hi Everyone,
Need help i need to write if condition,
I want to display attribute values where the attribute name = target_skill_MI.
Can anyone help me with the exception.
where ever the target_skill_MI is there i want to replace with attribute values remaining data should not change only this target_skill_MI need to change.