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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bvendeza
Contributor II
Contributor II

Is there any function that generates a day range?

I'm trying to configure my chart to show results on a rolling 7-day period (Ex. if today is 5/23/2022, I want my graph to display data from 5/17/2022 to 5/23/2022).I can do a rolling 'last 3 months' using variables that utilize MonthStart, MonthEnd and AddMonths etc. But I was wondering if there's any way to do that for days? I can only find AddMonths and AddYears.

Thank you in advance!

Labels (1)
2 Replies
James5654
Contributor II
Contributor II

The DAY function takes just one argument, the date from which you want to extract the day. In the example, the formula is: = DAY ( B5 ) B5 contains a date value for January 5, 2016.  MyCFAVisit.com

MayilVahanan

HI

You can minus the days in the date function like

>$(=Date(Today()-7))<=$(=Date(Today()))

or with max date

>$(=Date(Max(DateField)-7))<=$(=Date(Max(DateField))

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