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: 
anuradhaa
Partner - Creator II
Partner - Creator II

Get last 14 day data

I have a date file in 03-JAN-16,........

I want to get last 14 days data inside expression on pivot table.

how do modify below expression to get ReloadTime-1 to ReloadTime-15. (That last 14 complete days)

Count({<MY_DATE = {"=MY_DATE >= ReloadTime()-14"}>} ABC)

Thanks,

1 Solution

Accepted Solutions
sunny_talwar

What about this:

Count({<MY_DATE = {"$(='>=' & Date(Today() - 15, 'YYYY/MM/DD') & '<=' & Date(Today() - 1, 'YYYY/MM/DD'))}>} ABC)

Not sure what your MY_DATE format is, but make sure you add that to the set expression above.

View solution in original post

3 Replies
sunny_talwar

May be this:

Count({<MY_DATE = {"$(='>=' & Date(Max({1}MY_DATE) - 14, 'DD-MMM-YY') & '<=' & Date(Max({1}MY_DATE), 'DD-MMM-YY'))}>} ABC)

or this

Count({<MY_DATE = {"$(='>=' & Date(Max(Floor(ReloadTime())) - 14, 'DD-MMM-YY') & '<=' &Date(Max(Floor(ReloadTime())), 'DD-MMM-YY'))}>} ABC)

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Not works, what i want is if today is 2016/05/28 i want to get data relevant to 2016/05/27 to (2016/05/27 - 14) days

(2016/05/13)

sunny_talwar

What about this:

Count({<MY_DATE = {"$(='>=' & Date(Today() - 15, 'YYYY/MM/DD') & '<=' & Date(Today() - 1, 'YYYY/MM/DD'))}>} ABC)

Not sure what your MY_DATE format is, but make sure you add that to the set expression above.