Adding a prompt to a filter based on a metric

Hello there,

If you need to add a prompt to a filter based on a metric, you just need to do this:

  1. Create a filter using a metric in a report;
  2. In the parameters, just use Custom for the expression;
  3. 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.

2 thoughts on “Adding a prompt to a filter based on a metric

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s