I'd like to set up a rule for the 'transaction_date' column to verify if the latest date in the column equals to previous work day. How can I do this? Is there any function for that? If there isn’t , we also have an additional calendar table where previous work day indicated for each date. But how can I indicate another table inside a rule?
Thanks in advance.
Page 1 / 1
Hello @aysel_jafarzade,
I suppose you could try using aggregation rules for this purpose - this way you’ll be able to take advantage of the maximum() function that would identify the latest date in the dataset for you. For the purpose of aggregation you could pick either some specific aggregation key or create a variable that would be used as a sort of artificial key that would allow you to aggregate all the records in the dataset and then look for maximum value. In my case i used “key” string value as aggregation key so all the records are aggregated together.
Here’s an example of rule implementation:
The condition i have uses a couple date functions: maximum(date) != dateAdd(today(),-1,"DAY")
You can read this condition as “maximum/latest date value is not equal to current day - 1 day. Here are examples where today() would mean 18th of March.
Please try to follow the example i shared and build your version of such rule. I hope this would be helpful.