Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to restrict
where YEAR = 2015 and 2016.
how to do this in qlikview.
If you want to restrict it while loading the data from database then do it like below
Data:
SQL SELECT *
FROM Tablename
where YEARFIELD IN ('2015','2016');
STORE Data into path\Tablename.QVD;
DROP TABLE Data;
if you want to restrict this in Qlikview script
Data:
LOAD *
FROM Tablename.QVD(QVD)
WHERE match(YEARFIELD,'2015','2016');
If you want to restrict at chart level use the below expression
=sum({<YEAR ={'2015','2016'}>Value)
You can add it in script almost like SQL.
LOAD *
FROM
YourQVDHere.qvd
(qvd)
where(year = ('2015') or year = ('2016'));
Where do you want to restrict this? In a chart or with loading the data?
Niklas. Might be he want, 2015 and 2016 data..
SELECT *
FROM table
WHERE YEAR IN (2015, 2016);
If you want to restrict it while loading the data from database then do it like below
Data:
SQL SELECT *
FROM Tablename
where YEARFIELD IN ('2015','2016');
STORE Data into path\Tablename.QVD;
DROP TABLE Data;
if you want to restrict this in Qlikview script
Data:
LOAD *
FROM Tablename.QVD(QVD)
WHERE match(YEARFIELD,'2015','2016');
If you want to restrict at chart level use the below expression
=sum({<YEAR ={'2015','2016'}>Value)
WHERE match(YEARFIELD,'2015','2016');
This is worked. thanks Kishal.