Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I usually do this in QlikView :
LET vLoadQvdCondition=' WHERE monthname(acu.Mois) < monthname(addMonths(now(), -1))';
Load *
from Qvd (qvd)
$(vLoadQvdCondition)
and it works fine.
But when I do this in QlikSense (april 2019), $(vLoadQvdCondition) appears in red and does nothing ???
Hello Bertrand,
If I try this in Qlik Sense the variable containing the where clause shows up in red, but it is working. The first thing you have to do, however, is create a connection to the folder containing the qvd file. So that your from statement looks like this:
FROM [lib://QVDfolder/File.qvd]
(qvd)
$(vLoadQvdCondition);
The vLoadQvdCondition still shows up red, but in my case it works on loading. Could that be the solution?
Regards,
Tim Wensink
Yes I have the connection and it works fine when write the where condition.
Also what surprise me is that I can write any variable like $(toto) that doesn't exits and the load doesn't detect any error.
Hello Bertrand,
I agree that it's strange that you can use non-existing variables. If I use a variable that does exist, it does work in my case.
If you look at this example:
let vVar = 'where 1=0';
LOAD
*
FROM [lib://QVD/Test.qvd]
(qvd)
$(vVar);
if I run this, zero lines are read. If I use a non-existing variable, all lines are read. is your variable filled correctly?
Greetings,
Tim Wensink
Thanks Tim for your help,
Yes I've tried 'where 1=0'; and it works.
In fact my problem comes from escape characters :
let vVar =[ where Réseau='ABCD'];
doesn't work, all the data's Qvd are loaded, there's no selection as when I apply directly this condition on the Load Qvd.
Finally I have found where the problem come :
let vVar ='where Réseau=''ABCD''';
The final '''; also appears in red, it took me time to realise that this is correct..