Set Parameter Default Month to to current month

Hi, I have a parameter control that can be used to filter by month. How do I set the default value of the month parameter such that it defaults to the most recent month, but still gives option to user to filter for previous months?

You can set up the parameter to be defaulted to this month.

Then you can add a control that changes the date of the parameter.

image

Then you would just have a filter that says your date is after your parameter date.

Thanks for your reply Max. The solution above gives a granularity of day level. I want my control to be such the it gives just the month number. So if most recent month is August, the control should automatically be set to “8”, but have dropdown options for other months from 1 through 12 that the user can select.

Yes the relative date filter would always be to the day.

You could look to change this to an integer and have it based off of the months.

You would have to create a dynamic default parameter to be defaulted to this month.

Then you would set up your filters to be equal to the extracted month.

extract('MM',{date})

I believe the dynamic default parameter sets a default for each user. However, I want to just be able to have the dashboard viewable to everyone. I am assuming I can’t get the exact functionality I want currently.

You can with dynamic default parameters. You just need to set up a database that keeps a record of everyone in your account.