Discussion Board for collaboration on QlikView Scripting.
Is it possible to conditionally specify a WHERE statement in QlikView - the following code snippet won't work, but it gives you an idea of what I want to do:
LOAD * FROM STDQVD\TRANSACTIONS.qvd (qvd)
if([Allow Sensitive Transactions]='Y'
,WHERE NOT EXISTS([Transaction Detail Code],1212,1234,1909)
Any ideas gratefully received.
Go to Solution.
Yes, possible. Here's one way. "Allow Sensitive Transactions" must be a variable -- perhaps loaded from another table. It can't be part of the transactions.qvd you are loading.
Not syntax checked, but will give you the idea.
LET vCondition = if(vAllowSensitiveTransactions = 'Y',
,' ' // Allow all trans
, 'WHERE NOT match([Transaction Detail Code], 1212, 1234, 1909)'
Thank you Rob. That's just the steer I needed to get this one cracked!