Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare the count of today and yesterday

Hi all,

How can i compare the count of today and yesterday and i need the difference in percentage.

For ex:

Today count is 75 and yesterday count is 50 the difference is 25.

I need to display how much % is increased from yesterday to today.

Thanks,

pramod

8 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Are you a date calendar?

You could try with

Count({$ <myDate={'$(=Today())'}>} myValue)

/

Count({$ <myDate={'$(=Today()-1)'}>} myValue)

let me know

Not applicable
Author

yes, I am using date calendar.

Count({$ <CanonicalDate={'$(=Today())'}, DateType = {invitation}>} invitation_id)

/

Count({$ <CanonicalDate={'$(=Today()-1)'},DateType = {invitation}>} invitation_id)

I used like above i'm not getting the value.

alexandros17
Partner - Champion III
Partner - Champion III

Could you share your document?

anderseriksson
Partner - Specialist
Partner - Specialist

The principal is correct but you need to make sure the dates in set analysis is formatted as text and not numbers.

Your most likely problem is that Today()-1 is not a date but a number and thus the set analysis search will not work.

Try putting a Date(..) around it like Date(Today()-1) instead.

jagan
Luminary Alumni
Luminary Alumni

Hi Pramod,

Try this

Count({$ <CanonicalDate={'$(=Today())'}, DateType = {invitation}>} invitation_id)

/

Count({$ <CanonicalDate={'$(=Date(Today()-1))'},DateType = {invitation}>} invitation_id)

Note: CanonicalDate & Today() should be in the same date format.

Regards,

Jagan.

Not applicable
Author

Count({$ <CanonicalDate={'$(=Date(Today()))'}, DateType = {invitation}>} invitation_id)

/

Count({$ <CanonicalDate={'$(=Date(Today()-1))'},DateType = {invitation}>} invitation_id)

Not working my canonicalDate is in this format :10-22-2015

Date(Today()) is in the format : 10/22/2015

Is both same?

anderseriksson
Partner - Specialist
Partner - Specialist

They are not! / is not same as -

You need a format string to the Date-function.

Format string should be 'MM-dd-yyyy'

Not applicable
Author

I am getting the count. The issue is:

for today() count is 84.

for today()-1 count is 81.

The count is perfect. Now i need show the percentage of difference and through conditional colors tab i need  to show it's + or -.

please help on this.