Answer
Follow the steps below to create a dynamic parameter:
Prior setup
1. Connect to Sample - Superstore.
2. Drag and drop [Sales] to Rows.
3. Drag and drop [Order Date] to Colums while right-clicking and select [YEAR(Order Date)]
4. Drag and drop [Order Date] to Colums while right-clicking and select [MONTH(Order Date)]
Steps to create parameter
5. Create calculated field as follows.
Name: Last 3 Months
Calculation: <
+ DATE(IF [Order Date] > DATEADD('month',-1,DATETRUNC('month',TODAY()))
THEN DATEADD('month',-2,DATETRUNC('month',TODAY()))
ELSE TODAY()
END)
6. Right click [Last 3 Months] and create parameter as following.
Allowable values : Range
Tick the checkbox for "When workbook opens".
And select [Last 3 Months] from pull-down menu.
7. Create calculated field as following.
Name: Date_Filter
Calculation: [Order Date] > [Last 3 Months Parameter]
8. Drag and drop [Date_Filter] to Filters pain and select "True".
9. Right click [Last 3 Months] and click Show Parameter.