Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
manozpph
Creator
Creator

How to show current data over 2 tables......?

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!!

4 Replies
shreya_nadkarni
Partner
Partner

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;

vishsaggi
Champion III
Champion III

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);

manozpph
Creator
Creator
Author

Got it.Thank you:)

manozpph
Creator
Creator
Author

Thank you:)