Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

> or < in Script

Hi Community,

Is there any other to keep < or > in Script part as these are not wroking.

for ex:

if( amt_1 > amt2 ,amt_1,if( amt_1 < amt2 , amt_2)) as amt_F

the above column amt_F have 0 rows, when use the same if statement in front end side and I am getting values.

-Priya

1 Solution

Accepted Solutions
sunny_talwar

Try with RangeMin()

RangeMin(Bought, Sold) as Final

View solution in original post

13 Replies
sunny_talwar

Can you share the script for the table where you are doing this?

sunny_talwar

You can simplify your expression to this

RangeMax(amt_1, amt_2) as amt_F

But don't think that will resolve your 0 row issue

priyarane
Specialist
Specialist
Author

added

priyarane
Specialist
Specialist
Author

it gives me values but there are 3 scenarios

if( amt_1 > amt2 ,amt_1,if( amt_1 < amt2 , amt_2,if( amt_1 =amt2 ,amt_1))) as amt_F

sunny_talwar

This seems to be working

Table:

LOAD Amt1,

    Amt2,

    Alt(Amt1, Amt2) as AmtF1,

    RangeMax(Amt1, Amt2) as AmtF2

FROM

[..\..\Downloads\Dat sample.xlsx]

(ooxml, embedded labels, table is Sheet1);


Capture.PNG

sunny_talwar

This should still work

RangeMax(amt_1, amt_2) as amt_F

PrashantSangle

if( amt_1 > amt2 ,amt_1, amt_2) as amt_F


will work


Note : check field Name is it amt2 or amt_2


Your data will not help. Please provide proper data.


Regards


Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

In 3rd scenario

if( amt_1 > amt2 ,amt_1,if( amt_1 < amt2 , amt_2,amt_1) )as amt_F


Note : check field Name is it amt2 or amt_2


Regards,



Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
priyarane
Specialist
Specialist
Author

names are fine, I just typed we can correct, take only content pls.