Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor

Using sub filed for > or < in If condition?

Hi Everyone,

I have a requirement where is need to perform calculations based on range of amount. ( < or >=)

PFA attached file which has sample data . I am unable to achieve the results with if condition and using sub field in it.

Please help me understand the error.

Thanks

1 Solution

Accepted Solutions
Highlighted

Re: Using sub filed for > or < in If condition?

Try changing you Calc1 calculation to:

if(if(SubField(Range,' ',1) = '<', [Paid Amount] < SubField(Range,' ',2), [Paid Amount] >= SubField(Range,' ',2)), [Paid Amount] * Discount),[Paid Amount] * Discount )as Calc1

I've also attached an updated version of your file.

View solution in original post

1 Reply
Highlighted

Re: Using sub filed for > or < in If condition?

Try changing you Calc1 calculation to:

if(if(SubField(Range,' ',1) = '<', [Paid Amount] < SubField(Range,' ',2), [Paid Amount] >= SubField(Range,' ',2)), [Paid Amount] * Discount),[Paid Amount] * Discount )as Calc1

I've also attached an updated version of your file.

View solution in original post