Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
thedoge1
Contributor III
Contributor III

Previous single days data in expression

Hello,

I am attempting to alter an expression that currently provides data for the last 30 days to the current day.  I would like to show the data for just single previous days from the current date.  Below is the expression that provides the data for the last 30 days and the expression with the changes that I have attempted but will not run.  Any help would be appreciated.

//count({<[Class Category ID]={0}, [Path & Area]={'People Count 1'}, [Group]={'Plaza people counting cameras'}, Date={">=$(=Date(Today()-30,'DD/MM/YYYY'))"}>} ObjectID)


count({<[Class Category ID]={0}, [Path & Area]={'People Count 1'}, [Group]={'Plaza people counting cameras'}, Date={"=$(=Date(Today(1)-30,'DD/MM/YYYY'))"} ObjectID)

 

Thanks

Dan

4 Replies
Vegar
MVP
MVP

Please explain what you mean by "single previous days". Is it yesterday and today()? If so, then try this:

count({<[Class Category ID]={0}, [Path & Area]={'People Count 1'}, [Group]={'Plaza people counting cameras'}, Date={">=$(=Date(Today()-1,'DD/MM/YYYY'))"}>} ObjectID)

thedoge1
Contributor III
Contributor III
Author

I am wanting to get the data for just a single day but I want to use the current day as a reference point.  For example if  the date is 6/6/2021 and I want just the data for 6/4/2021 the function would reference the current day minus 2 days.

Vegar
MVP
MVP

Try this.

count({<[Class Category ID]={0}, [Path & Area]={'People Count 1'}, [Group]={'Plaza people counting cameras'}, Date={'$(=Date(Today()-2,'DD/MM/YYYY'))'}>} ObjectID)

 

It is important that your date format string 'DD/MM/YYYY' is similar to your Date field format. 

thedoge1
Contributor III
Contributor III
Author

Thank you, that expression did it for me.