Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Use Yesterday in expression

Hi,

please help me with this expression - cannot get it right:

Count({<[Posted Date]={"=date(today()-1)"}>} [Trans Amount])

I want to count the number of transactions that have a Posted Date of Yesterday.

Thanks in advance,

Gerhard

1 Solution

Accepted Solutions
Highlighted
Not applicable

Count({<[Posted Date]={"$(=date(vYESTERDAY))"}>} [Trans Amount])

you use [Posted date] instead [Posted Date]

View solution in original post

13 Replies
Highlighted
MVP
MVP

Highlighted
Creator II
Creator II

Thanks Tresesco,

but that's still not working. I now have:

Count({<[Posted Date]={"=$(=date(today()-1,'YYYY/MM/DD'))"}>} [Trans Amount])

But it gives me the same value as Count([Trans Amount])

Highlighted
MVP
MVP

you always have a scope of checking if the date(today()-1,'YYYY/MM/DD') producing the right date in right format. i guess the issue is with date format.

Highlighted
Not applicable

what is your date format?

Highlighted
Creator II
Creator II

SET DateFormat='YYYY/MM/DD';

Load

DATE(DATE#( left([Posted Date],11), 'DD-MMM-YY')) as [Posted Date],

Highlighted
Not applicable

could you send small sample qvw file ?

Highlighted
MVP
MVP

Did you try - Count({<[Posted Date]={"=$(=date(today()-1,'DD-MMM-YY'))"}>} [Trans Amount]) ?

Highlighted
Creator II
Creator II

Yes, that give me zero values.

Highlighted
Creator II
Creator II

Please see attached.