If you need to add a prompt to a filter based on a metric, you just need to do this:
- Create a filter using a metric in a report;
- In the parameters, just use Custom for the expression;
- Insert an Applysimple function. Ex.:
ApplySimple(“Dateadd(Month, Datediff(Month, 0, DATEADD(m, -#0, current_timestamp)), 0)”,? Months)
4. In this example, I’m using a Months prompt to get an integer answer from the user to fill the #0 wildcard.
The trick here is the put the prompt name as: ? NAME_OF_THE_PROMPT
Hope it helps.
God bless you.