Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have a question asked by someone that Excel Spreadsheet has a data source file.
I loaded 2 tables from same data source file. Tables has last year and current year data.
Now my requirement is 2 tables has to show only current data leaving last year.
How can I achieve this....?
Thanks in Advance!!
new:
load *
Inline
[
year,data
2018,2000
2017,1000
2016,3000
];
Temp:
LOAD
max(year) as maxyear
Resident new;
LET vMaxDate = floor(peek('maxyear'));
NoConcatenate
final:
load
*
Resident
new where year=$(vMaxDate);
drop table new;
You want to filter and load only current year data from Load or in front end. Try like below INLINE table is for example.
SET vCurrYear = 'Year(Today())';
Table1:
LOAD * INLINE [
ID, DOCDATE, Subtotal
1, 6/27/2018, 100
2, 6/27/2018, 200
3, 6/27/2018, 100
4, 6/27/2017, 300
5, 6/27/2017, 200
6, 6/27/2017, 700
]
WHERE Year(DOCDATE) = $(vCurrYear);
Got it.Thank you:)
Thank you:)