Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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