Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshman1031
Contributor III
Contributor III

How to get last 10 dates from date field

Hi All,

I have date field OrderDate and I want to see the last 10 dates from date field. if i select any date then i want to see the last 10 records.

I am trying to use max(OrderDate)-10 then I am able to see the last 10 dates Serial.

For example

Orderdate: 

16-09-2024
17-09-2024
18-09-2024
19-09-2024
20-09-2024
22-09-2024
23-09-2024
24-09-2024
26-09-2024
27-09-2024
28-09-2024
30-09-2024
03-10-2024

I want to see last 10 dates not for serial dates.

Can you please suggest me how to Solve this scenario.

 

Thanks & Regards,

Lakshman

Labels (1)
1 Reply
Chanty4u
MVP
MVP

You can try this 

Count({<OrderDate={"=OrderDate >= Max(OrderDate)-10 and OrderDate <= Max(OrderDate)"}>} OrderDate)

 

Please check your date formats