Pamir Rahimzadeh Posted October 3 Share Posted October 3 Hi Community, I am working on an automation services job to open a dashboard, set a Date range filter within my data according to the current date, then send an email with the visualization. I am using the configuration block SetFilter statement where I would like to set the highValue parameter to a specific date, based on the current date (I am pulling weekly metrics, so I would like the highValue to be set to the most-recent Saturday based on the date of the automation services job being run). I see examples online where one can insert a field, such as {date}, but my use case is more for a calculated value, where the report should be sent on Monday (for example), but the filter should be set to show data through the previous Saturday. Would my solution have to utilize document properties with some sort of calculation? If so, how would I set up such a document property? Any help would be appreciated! Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted October 4 Share Posted October 4 Hi Pamir, I would think you would nee a couple of calculated columns. You need to calculated the day number for previous Saturday as well as the day of sending. Both will result in a the day number. This number can then be used to calculate the days between the day of sending and the previous Saturday, to filter out how many days you need to 'go back in time' to filter. I don't have an example of the code, but maybe this gets you started. Kind regards, David Link to comment Share on other sites More sharing options...
Pamir Rahimzadeh Posted October 4 Author Share Posted October 4 10 hours ago, David Boot-Olazabal said: Hi Pamir, I would think you would nee a couple of calculated columns. You need to calculated the day number for previous Saturday as well as the day of sending. Both will result in a the day number. This number can then be used to calculate the days between the day of sending and the previous Saturday, to filter out how many days you need to 'go back in time' to filter. I don't have an example of the code, but maybe this gets you started. Kind regards, David Hey David, this all makes sense. How would you subtract from dates in a configuration block? Or how would you use a calculated column in a configuration block? I have seen examples where these are static sorts of values provided by the user creating the automation job. Is there a way to provide dynamic values, outside of something like {"date"}, which uses the current date? I guess I am asking, is there any guidance document on what possible dynamic values and operations can be performed on configuration block parameters? Specifically those with dates? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now