cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Date Filter - Allow User to Select Different Dates

cglowe
8 - Cloud Apps
8 - Cloud Apps

I have dashboards that I want to be filtered, by default, to current month + previous 12 months, as shown below.  However, I also want end users to have the ability to select a different date range if they want.  My issue is that when end users go to edit the date filter, they see the JAQL below, which will likely not be intuitive to them.  Is there a way to have all months show up in the filter, like a normal list view, while also defaulting to the most current 13 months?

cglowe_0-1645633335090.png

 

1 REPLY 1

BobF
7 - Data Storage
7 - Data Storage

Hi

I've done something similar, adding a new custom field e.g. "Monthly_Report_Date", based on the date, using a Case statement to build it up. You can add as many values you want. Below shows an example for just 3 values

Case
WHEN MonthDiff(CURRENTDATE(),[<Your_Date>])=0 THEN 'Current Month'
WHEN MonthDiff(CURRENTDATE(),[<Your_Date>])=1 THEN 'Last Month'
WHEN MonthDiff(CURRENTDATE(),[<Your_Date>])=2 THEN 'Two Months Ago'
END