Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
philmywallet
New Contributor III

Set Analysis a week ago Dynamic

Hi

The following expression shows data based on any data for when the roster date=today.

(Count({<

Sickness_SMART.Roster_RosterDate={'$(=Today())'}

>} [Sickness_SMART.Full Name]))

I want to create the same expression for this day last week, but it returns zero.  See below

(Count({<

Sickness_SMART.Roster_RosterDate={'$(=Today()-1)'}

>} [Sickness_SMART.Full Name]))

Any thoughts why it doesn't work

1 Solution

Accepted Solutions
MVP
MVP

Re: Set Analysis a week ago Dynamic

Try like: (Count({<Sickness_SMART.Roster_RosterDate={'$(=Date(Today()-7))'} >} [Sickness_SMART.Full Name]))

3 Replies
MVP
MVP

Re: Set Analysis a week ago Dynamic

Try like: (Count({<Sickness_SMART.Roster_RosterDate={'$(=Date(Today()-7))'} >} [Sickness_SMART.Full Name]))

pradosh_thakur
Honored Contributor II

Re: Set Analysis a week ago Dynamic

hi

this is why your expression is not working.

1: You have done today()-1 instead of today()-7

2: today()-7 will return you a number not a date

3: Change that number to date by date() function

4: Make sure all your dates are in same format.

The solution is already provided by tresesco  and should work

Learning never stops.
philmywallet
New Contributor III

Re: Set Analysis a week ago Dynamic

I realised typed 1 on my question, but I meant to type 7. 

Thanks

Phil

Community Browser