Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, I have a field DATESTAMP and I need to limit it with 2 years of data.
To see data only of YEAR N & YEAR N-1.
Could someone please help with this.
If you're using the Data load editor you can add a Where clause to your load statement.
MyTable:
LOAD * FROM ...MySource...
WHERE Year(MyDateStampField) >= Year(Today())-1;
Do you want to limit the data you load into the app or do you only want to limit the data shown in a chart?
What is the value of N? Is this based on the current date or does the user select the years?
Hi Gysbert, thanks for responding.
I want to limit the data I load into the app.
N is based on the current date. i.e. at this moment - last 2 years (2020 and 2021 )
If you're using the Data load editor you can add a Where clause to your load statement.
MyTable:
LOAD * FROM ...MySource...
WHERE Year(MyDateStampField) >= Year(Today())-1;
yes, I'm using the data load editor.
Q1. I'm writing a SQL select statement before FROM.
so what should be the syntax?
LOAD
A,
B,
DATESTAMP;
SQL SELECT A,B,DATESTAMP
FROM ... WHERE Year(DATESTAMP) >= Year(Today())-1; ?
Q2. ALSO, This where clause [WHERE Year(MyDateStampField) >= Year(Today())-1;] WILL I GIVE last 2 years of data or just previous year data?
Sice its >= im guessing it will take prev and current year.
but could you please clarify about the syntax.
I am new to QlikView and working on an existing application so I apologize if this has been answered or obvious:
I am trying to limit the data in a Pivot table.
Where do I find the Data Load Editor in QlikView? Is it under one of the menus?
Again,
Thank you for any help you can provide.