Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

gerhardl
Contributor 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

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: Use Yesterday in expression

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

you use [Posted date] instead [Posted Date]

13 Replies
MVP
MVP

Re: Use Yesterday in expression

gerhardl
Contributor II

Re: Use Yesterday in expression

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])

MVP
MVP

Re: Use Yesterday in expression

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.

Not applicable

Re: Use Yesterday in expression

what is your date format?

gerhardl
Contributor II

Re: Use Yesterday in expression

SET DateFormat='YYYY/MM/DD';

Load

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

Not applicable

Re: Use Yesterday in expression

could you send small sample qvw file ?

MVP
MVP

Re: Use Yesterday in expression

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

gerhardl
Contributor II

Re: Use Yesterday in expression

Yes, that give me zero values.

gerhardl
Contributor II

Re: Use Yesterday in expression

Please see attached.

Community Browser