Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

manozpph
New Contributor III

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
New Contributor III

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

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
Esteemed Contributor III

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

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
New Contributor III

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

Got it.Thank youSmiley Happy

manozpph
New Contributor III

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

Thank youSmiley Happy

Community Browser