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: 
deepakqlikview_123
Specialist
Specialist

Getting count for last week

I need to get count for last week( current week -1) i am using below expression but it is not working

can you please suggest on this

=count({$<RAG_STATUS={'Red'} , WEEK_DATE={$(=Date([WEEK_DATE]-7))}>} distinct[Release ID])

2 Replies
sunny_talwar

Try this:

=Count({$<RAG_STATUS={'Red'} , WEEK_DATE={"$(=Date(Max([WEEK_DATE])-7))"}>} Distinct [Release ID])


Also make sure that WEEK_DATE and the expression $(=Date(Max([WEEK_DATE])-7)) gives the same format.

sunny_talwar

Also do you need the count for a day or the whole week (7 days)?

For a week, try this may be:

=Count({$<RAG_STATUS={'Red'} , WEEK_DATE={"$(='>=' & Date(Max([WEEK_DATE])-14) & '<=' & Date(Max([WEEK_DATE])-7))"}>} Distinct [Release ID])