Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sat_tok52
Creator
Creator

How to create last seven days Flag in Qlik sense

Hi All,

I have to create last seven days flag in script ,instead of today() i have to take  max date of my date less than 7 days . Any help.

IF(Date >max(Date)-7,1,0)

Thanks,

 

Labels (1)
2 Replies
menta
Partner
Partner

You can load the fact table and store the max date into variable.

DateTmp:

Load Max(Date) as MaxDate

resident <your fact table>;

Let vMaxDate = peek('MaxDate',-1,'DateTmp');

 

NOW

 

IF(Date >$(vMaxDate )-7,1,0)