Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Tags (4)
1 Solution

Accepted Solutions
Not applicable

Re: Count based on a date condition

hey jose,

why don't you try

vDate=date(today()-1)

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

cheers,

kunal bhattacharjee

6 Replies

Re: Count based on a date condition

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

Re: Count based on a date condition

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

Re: Count based on a date condition

hey jose,

why don't you try

vDate=date(today()-1)

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

cheers,

kunal bhattacharjee

Re: Count based on a date condition

let me know the date format of Incident Create Date

Not applicable

Re: Count based on a date condition

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

Not applicable

Re: Count based on a date condition

hey jose,

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

cheers,

kunal bhattacharjee