Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,943
Community Members
 
Community Events
168
Community Groups

Dynamic filter for dates

I'm using the Table Filter macro in a dashboard to show dated items from tables on other pages.  I want to use the dynamic filter so that the dates of items shown are from two weeks prior to today, through today.  Is it possible to set this up so that the filter doesn't have to be updated manually?

1 answer

1 accepted

2 votes
Answer accepted

Hi @Erica L,

Here you can find dynamic variables for date filters. In your case, you need to set from -2w to today.

Thank you so much.  I didn't realise that I could type in "today".  

 

Cheers!

@Andrey Khaneev _StiltSoft_ Is there an option for previous month? I checked out the link but didn't see that option.

Hi @Andrea Conver ,

It is possbile to set -1m. So it is equal to Feb 17 for today. Is it what you need?

Hi @Andrey Khaneev _StiltSoft_ ,

That's close, but I don't want the query to be the last 30 days. I'd like the report to always be 1st day of the month to the last day of the previous month. So if I run the report today, I'd like the query to run 2/1-2/28. Thanks!

It is not possible to do with the Table Filter macro, but you can use the Table Transformer macro with the following query:

SELECT * FROM T1
WHERE T1.'Date' <= ("monthstart" - "1d") AND T1.'Date' >= (("monthstart" - "1d")::Date->setDate(1))

 Here the Date is the name of column with dates to filter.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events