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

Count based on a date condition

I want to count all the tickets that were created yesterday using the column CREATED DATE

Please send the expression, I am thinking of using the today()-1 function

TicketsSense.JPG.jpg

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

hey jose,

why don't you try

vDate=date(today()-1)

count({<createdDate={"$(vDate)"}>}distinct [incident number])

cheers,

kunal bhattacharjee

View solution in original post

6 Replies
MK_QSL
MVP
MVP

Write below just below [Created Date] in script

Date(Floor(TimeStamp([Created Date])),'DD/MM/YYYY') as CreatedDate,

Now use below Expression in Front End

=COUNT({<CreatedDate = {'$(=Date(Today()-1),'DD/MM/YYYY')'}>}Distinct Ticket#)

Not applicable
Author

Thanks Manish, I followed your instructions, however the value is always 0.00 when I see some records from the previous day. What am I doing wrong?

LOAD

    "Incident Number",

    "Destination System Reference Number",

    "Date Occurred",

    "Incident Created Date",

    Date(Floor(TimeStamp([Incident Created Date])),'DD/MM/YYYY') as CreatedDate,

    "Last Modified Date",

COUNT({<CreatedDate = {'$(=Date(Today()-1),'DD/MM/YYYY')'}>}Distinct [Incident Number])

Not applicable
Author

hey jose,

why don't you try

vDate=date(today()-1)

count({<createdDate={"$(vDate)"}>}distinct [incident number])

cheers,

kunal bhattacharjee

MK_QSL
MVP
MVP

let me know the date format of Incident Create Date

Not applicable
Author

Thanks Kunal and Manish, I tried the vDate and it is working now, MUCHAS GRACIAS!

Not applicable
Author

hey jose,

can you please mark the correct answer and helpful answer and close the thread? that would be helpful!

cheers,

kunal bhattacharjee