Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser222
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
Nicole-Smith

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
Nicole-Smith

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.