Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Can anyone help me on that?
Regards,
Mo
you could try something like this
count({<Updated = {"$(=date(today()-1,'MM/DD/YYYY'))"}>} Clientid)
Thanks for helping but it is still returning a zero value
This worked..
count({<[total patient enrolled in program.Updated] = {"$(=date(today()-1,'MM/DD/YYYY hh:mm:ss'))"}>} Clientid)
Thanks again.
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)
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))"}
Good Morning and thanks for your response. total patient enrolled in program.Updated is a datefield.
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)