Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to restrict the table loading by giving some condition in the where clause. And I need to store the possible values in the variable
For example :
LET Var='Chairs,tables';
LOAD
----
------
--------
WHERE (Products='$(Var)');
But i encounter some error in this. Is there any possible way to do this. I need to store the possible values in the variable
Why do you need a variable to filter the table?
Can you not use an inline load? i.e
See sample below...If you use this, the filter field Products must not be loaded prior to using this...
The filter text (Tables, Chairs) must be exact match as in your table/Case sensitive.
Filter:
LOAD * INLINE [
Products
Tables
Chairs
];
YourTable:
LOAD *
FROM
YourSource...
where Exists(Products);
Hi,
you can use this
LOAD
---
---
WHERE MIXMATCH(Products, $(Var) );
No nothing is fetched up. The comma and the quotes separation in variable is the thing to be taken care of. I need help in that
You can change variable like below
SET Var='Chairs,tables';
Please read this !!!
I got into a conversation with someone today who was struggling to understand the difference between SET and LET. It wasn't the first time I've had this conversation so thought I'd explain it here too in case any QV newbies were also struggling with it.
SET is taken literally and what is on the right of the equals is written into the variable. So writing:
SET vMyVariable = 5*2;
Would result in vMyVariable containing "5*2".
LET is used when you wish QlikView to equate what is on the right of the equals and write the answer into the variable. So writing:
LET vMyVariable = 5*2;
Would result in vMyVariable containing "10".
Simples!
Why do you need a variable to filter the table?
Can you not use an inline load? i.e
See sample below...If you use this, the filter field Products must not be loaded prior to using this...
The filter text (Tables, Chairs) must be exact match as in your table/Case sensitive.
Filter:
LOAD * INLINE [
Products
Tables
Chairs
];
YourTable:
LOAD *
FROM
YourSource...
where Exists(Products);
Hi Nishanthi,
Try something like below
SET Var= 'Chairs' , 'tables' ;
LOAD
----
------
--------
WHERE WildMatch(Products, $(Var) );