Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

priyarane
Contributor III

> 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

Re: > or < in Script

Try with RangeMin()

RangeMin(Bought, Sold) as Final

13 Replies

Re: > or < in Script

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

Re: > or < in Script

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
Contributor III

Re: > or < in Script

added

priyarane
Contributor III

Re: > or < in Script

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

Highlighted

Re: > or < in Script

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

Re: > or < in Script

This should still work

RangeMax(amt_1, amt_2) as amt_F

Re: > or < in Script

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


Regards,
Prashant Sangle

Re: > or < in Script

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,



Regards,
Prashant Sangle
priyarane
Contributor III

Re: > or < in Script

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

Community Browser