Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
rsingh43
Contributor

last 150 days

Hi,

I would like to restrict the number of rows returned to the last 150 days from today(). I can't seem to find any using posts on the forum on how this is done, would be grateful for some assistance.

I require this in the where clause of the load editor.

thanks in advance.

Tags (2)
1 Solution

Accepted Solutions
olivierrobin
Valued Contributor III

Re: last 150 days

hello

I suppose you have a date in the data you load

so a where clause like

where CurrentDate-DateLoaded<=150 should work

you have to set CurrentDate to Today's date according to the date formats you treat

4 Replies
olivierrobin
Valued Contributor III

Re: last 150 days

hello

I suppose you have a date in the data you load

so a where clause like

where CurrentDate-DateLoaded<=150 should work

you have to set CurrentDate to Today's date according to the date formats you treat

Re: last 150 days

Number of rows - You want to show in chart? If((DateField - Today())<150, DateField)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
rsingh43
Contributor

Re: last 150 days

Thanks Olivier.

I had to slightly tweak the query to:

Ready - Today()  <=150

olivierrobin
Valued Contributor III

Re: last 150 days

remember to check the date format

if the answer is correct, remember to tag it correct and close the thread