Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mashikoo
Contributor
Contributor

Counting yesterday enrollment in Q

 
 

Hello community,

 

I'm working on a simple dashboard and I'm having troubles trying to count the numbers of enrollments that were created "yesterday". I'm presenting the overall count of enrollments and need to display "yesterday's" enrollment count as well.

This is the query I am using

count({<Updated = {'>=$(=DayStart(today()-1))<$(=DayStart(today()))'}>} Clientid)

As you would imagine, "yesterday" needs to be a dynamic value based on today's date.

I did try many ways, but they all end up with a zero value or an error in the expression. I'm using the following fields:

  • Updated, format is MM/DD/YYYY
  • ClientId

 

Can anyone help me on that?

 

Regards,

Mo

Labels (4)
7 Replies
Vegar
MVP
MVP

you could try something like this

count({<Updated = {"$(=date(today()-1,'MM/DD/YYYY'))"}>} Clientid)

mashikoo
Contributor
Contributor
Author

Thanks for helping but it is still returning a zero value

mashikoo
Contributor
Contributor
Author

This worked..

count({<[total patient enrolled in program.Updated] = {"$(=date(today()-1,'MM/DD/YYYY hh:mm:ss'))"}>} Clientid)

Thanks again.

mashikoo
Contributor
Contributor
Author

I am also trying to get the percentage of enrollment created yesterday. This is the expression I am using but it is not giving me what i want. Can someone please help?

Enrolled Yesterday / CheckIns:

sum({<[total patient enrolled in program.Updated] = {"$(=date(today()-1,'MM/DD/YYYY hh:mm:ss'))"}>} Clientid) / sum(total checkIns)

vinieme12
Champion III
Champion III

is the field [total patient enrolled in program.Updated]   a timestamp field??

[total patient enrolled in program.Updated] = {"$(=date(today()-1,'MM/DD/YYYY hh:mm:ss'))"}  

 

if [total patient enrolled in program.Updated] is actually a timestamp field then this expression will only return data for a specific time  example 05/30/2022 12:00:00    and not for the entire date 05/30/2022 

 

Create a new field   as below

Date(floor([total patient enrolled in program.Updated]) )  as datefield

then use

datefield = {"$(=Date(today()-1,'MM/DD/YYYY))"} 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
mashikoo
Contributor
Contributor
Author

Good Morning and thanks for your response. total patient enrolled in program.Updated is a datefield.

mashikoo
Contributor
Contributor
Author

I am also trying to get the percentage of enrollment created yesterday. This is the expression I am using but it is not giving me what i want. Can someone please help?

Enrolled Yesterday / CheckIns:

sum({<[total patient enrolled in program.Updated] = {"$(=date(today()-1,'MM/DD/YYYY hh:mm:ss'))"}>} Clientid) / sum(total checkIns)