Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
Partner - Contributor III

## How to show data from last year in a table

Hello everyone,

I want to compare yesterday's data with data from the same date last year.

I'm using the following to get yesterday's data, and it works as expected:

=count({<[Call Date]={'>=\$(=DayStart(today()-1))<\$(=DayStart(today()))'}>} DISTINCT [Call Number])

I do however have problems getting the "same date last year" part to work. I have looked at many threads in this forum, and ended with this approach, which does not work:

Can someone give me help me with this?

Thanks,

Nic

1 Solution

Accepted Solutions
MVP

can you try this

``=Count({<[Call Date] = {">=\$(=DayStart(AddYears(Today()-1, -1)))<\$(=DayStart(AddYears(Today(), -1)))"}>} DISTINCT [Call Number])``
9 Replies
MVP

Try this

``=Count({<[Call Date] = {">=\$(=DayStart(AddYears(Today()-1, -1))) < \$(=DayStart(AddYears(Today(), -1)))"}>} DISTINCT [Call Number])``
Partner - Contributor III
Author

Thank you! I just tried it, it does return a result, but the result is not accurate. But you've put me on the right track!

I looks as if it was capturing a year of worth of data (from a year ago until yesterday) instead of just "yesterday last year".

I tried moving the parenthesis around, but no luck (i either end up with 0 or a number representing the complete data)...

MVP

can you try this

``=Count({<[Call Date] = {">=\$(=DayStart(AddYears(Today()-1, -1)))<\$(=DayStart(AddYears(Today(), -1)))"}>} DISTINCT [Call Number])``
Partner - Contributor III
Author

I tried, it gives the same result. And it seems to be the exact same expression (might be wrong!).

Specialist II

Partner - Contributor III
Author

Thanks! This one returns 0...

MVP

Removed space before and after < in the set analysis

Partner - Contributor III
Author

Retried this morning, it worked right away!?!?!?!?!

thanks for you valuable help!

MVP

Awesome!!

Community Browser