Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need last 10 days data

Hi,

How to display last 10 days data.

Regards,

Manikanta

4 Replies
Not applicable
Author

Please provide more context, some sample data, and/or a sample qvw

maxgro
MVP
MVP

an example in the attachment

MarcoARaymundo
Creator III
Creator III

You can use Object->Properties->Dimension Limits or the Rank function.

Not applicable
Author

Hi,

Use a expression with an interval time using set analysis, something like this:

sum({<MyDateField={">=$(vStartDate) <=$(vEndDate)"}>}SALES)

where you declare two variables (in "Variables Overview") like this:

vEndDate = Max(MyDateField);

vStartDate = ($(vEndDate) -10);

or if you just need last 10 days of all your data limit your table in script:

MyTable_tmp:

LOAD

     Field1,

     Field2,

     FieldN,

     MyDateField

From MyData.qvd Order By MyDateField ASC;

Let vDateMax = Num(Peek('MyDateField', -1, 'MyTable_tmp'));

No Concatenate

MyTable:

LOAD

     *

resident MyTable_tmp

Where MyDateField >= ($(vDateMax)-10);

Drop Table MyTable_tmp;

Best regards.