How to get the previous day count for the current time for a metric

Hi there,
I’m trying to calculate the count of transactions for the previous day upto current time that day.
For example it is 4 PM today, I need the value for the previous day till 4 PM.

Trying to use this but it is throwing error.

countIf(id, (addedOn <= addDateTime(-1 , DD , now()) AND addedOn >= parseDate(addDateTime( -1 , DD , now()) , 'MM/dd/yyyy') )

Thanks

Hi,

Use this build in QS function periodToDateCountOverTime(
measure,
dateTime,
period)

please read this document this will help you.