Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gerhardl
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
Not applicable

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

you use [Posted date] instead [Posted Date]

View solution in original post

13 Replies
tresesco
MVP
MVP

gerhardl
Creator II
Creator II
Author

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

tresesco
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.

Not applicable

what is your date format?

gerhardl
Creator II
Creator II
Author

SET DateFormat='YYYY/MM/DD';

Load

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

Not applicable

could you send small sample qvw file ?

tresesco
MVP
MVP

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

gerhardl
Creator II
Creator II
Author

Yes, that give me zero values.

gerhardl
Creator II
Creator II
Author

Please see attached.