Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Reload the data from 2 to 10 Years

Hi Community memers,

I have problem in reloading data.The end user should be given the ability to decide how much data should be loading during data refresh.

example: 2 or 3 years of data should be asked to the user    

22 Replies
Not applicable
Author

Hi rameskmcs

Do you wnat select the reload period from web access AJAX / IEPlugign (Acces Point) or Desktop / Server reload?

Not applicable
Author

Hi Marcos,

Thanks for your response, Actually I have 10 years of data, when the user reloads, it should ask for how many years of data you want to reload.

Regards,

rams

Not applicable
Author

Qlikview never ask

Its not Possible.

but could b hard code like if you want ten years data .

jagan
Luminary Alumni
Luminary Alumni

Hi Ramesh,

Try this script

LET vValue = Input('Enter value', 'Input box');

Load 

*

FROM Table

WHERE Year >= Year(Today(), $(vValue));

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks for your resones, but I am getting below error.can you please tell me where the problem is.My table name

is Treat and my Year field name is Years.I have given the input value as 3 and got the following error

"Cannot open file 'E:\Qlikview\QV V10 Certification Project\Documentation\Treat

where Years>=Year' The filename, directory name, or volume label syntax is incorrect.

LOAD

*

From  Treat

where Years>=Year(Today(),3) "

Gysbert_Wassenaar

You need to change the 'From Table' line. That's just an example. Replace it with a reference to the file or an sql statement to get the data as appropriate to your situation


talk is cheap, supply exceeds demand
Not applicable
Author

hi Waseenar I am getting below error can you please correct me

Error in expression:

Year takes 1 parameter

LOAD

*

from [..\QVd's\Treat.qvd]

(qvd)

Where Years>=Year(Today(),1999)

MayilVahanan

hi

'

Test:

Load *,Year(Col3) As Year Inline

[

Col1,Col2,Col3,Sales

RO_0001,S1,4/15/2010,100

RO_0001,S2,3/19/2012,200

RO_0001,S2,1/10/2011,300

RO_0002,S2,3/25/2010,400

RO_0002,S2,8/8/2012,500

RO_0002,S1,10/10/2019,600

RO_0003,S1,12/12/2009,700

RO_0003,S2,10/01/2012,800

RO_0003,S2,06/05/2011,900

RO_0003,S2,05/05/2009,1000

] Where Col2='S2';

LET vValue = Input('Enter value', 'Input box');

Y:

NoConcatenate

Load Year as Years,Col1 resident Test where Year = Year(AddYears(today(),-$(vValue)));

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi Ramesh,

Hope attached file helps you.  It works for me.

Regards,

Jagan.