Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Really hope someone can help me with this one. I've created a formula in Excel which I'm trying to replicate as an expression in Qlik. The formula in Excel reads as:
=IF(AND(K4="False",L4="False",P4="True"),"Decrease CL",(IF(AND(K4="False",L4="True",P4="True"),"Increase CL","OK")))
Which reads and works fantastically. The closest I've been able to come with an expression within Qlik (which still doesn't return the correct results) is:
if([N2check equal MP CL]=False(),if([N2check more than MP CL]=False(),if([Actual Trading > MP Cred Lim]=True(),'Decrease CL',if([N2check equal MP CL]=False(),if([N2check more than MP CL]=True(),if([Actual Trading > MP Cred Lim]=True(),'Increase CL','OK'))))))
(where K = [N2check equal MP CL], L = [N2check more than MP CL] and P = [Actual Trading > MP Cred Lim], just to clarify that I have referenced the right dataset!!)
If anyone can help me code this correctly, it'd be much appreciated!
Kind regards,
Peter Allen
Hi RJ,
No, K, L and P are Excel references. I included the Excel formula so you can see what the result I'm trying to get in Qlik is. If you check out my responses to Ruben I explain a bit more about how I created each respective field.
Thanks,
Peter
Sorry Peter, had to run to a meeting.
What are the actual values of K, L and P? Are they actual text saying False and True? Or are they logical representations of True and False?
I know. But did you have the field equivalents as dimensions
To follow up on previous question. If they are stored in Excel as TRUE and FALSE then you would have to modfiy the script:
If( K4=0 and L4=0 and P4=1, 'Decrease CL',
If( K4=0 and L4=1 and P4=1, 'Increase CL', 'OK' )
)
QlikView will read the TRUE value as 1 and the FALSE value as 0.