Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We are having the below condition and it need to covert to qlikview logic.
Condition:
If Payment method is AL, AY,
If Order payment amount is greater than zero
If Order payment status is not completed or posted
If Contract status is not set to ‘O’ for transmit to Fiserv
If order status in not incomplete
If payment comment first 4 characters is not equal to WUS, ACCT or HOLD
Select Payment activity_Sales
The above condition need to covert into qlikview Expression.
In the above condition bolded were the fields.
Thanks..
In the script? In an expression? For a chart? In a text object?
QlikView syntax is quite straightforward if that is your requirement since you can nest several If() statements as it seems to be the case
Hi,
I need to use this in pivot table.
Thanks..
Something like:
If( Wildmatch(Payment method, 'AL', 'AY'),
If( [Order payment amount] > 0,
If( Wildmatch([Order payment status], 'completed', 'posted'),
If( [Contract status] = ‘O’ ,
If( NOT [order status]='incomplete',
If( NOT Wildmatch(Left([payment comment],4), 'WUS', 'ACCT', 'HOLD')),
[Payment activity_Sales], '' )))))) as YourFieldName
Regards,
Marty.
Set analysis like this should perform better than a direct translation of the IFs. Set analysis can't be used to check a non-field, though, which is why there's still a single IF here. If still slow, consider adding a field like [Payment Comment First 4 Bytes] and doing set analysis on it as well. Or instead, making a [Matches All My Conditions] flag and just checking for it in set analysis. I like complexity in script rather than charts where practical. But if, say, these fields were from multiple tables, doing it in script would probably be impractical.
sum({<[Payment method]*={'AL','AY'}
,[Order payment amount]*={">0"}
,[Order payment status]-={'completed','posted'}
,[Contract status]-={'O'}
,[Order status]-={'incomplete'}>}
if(not match(left([payment comment],4),'WUS','ACCT','HOLD')
,[Payment activity_sales]))
If you want to write it all in Set Modifiers, I believe you can write:
[payment comment]={"=not match(left([payment comment],4),'WUS','ACCT','HOLD')"}
-Rob
Doh! Must remember search expressions. Must remember search expressions. Search expressions good. Good search expressions.