How to create user-selectable control filter by group of {Date} (such as Day, Week, Month or Year)?

Hi, I have an Analysis using a SPICE type dataset. Within it, I have a Stacked bar Combo chart, with the {Date} field selected as the X-axis (aggregate function set to default of “MONTH”), and Impressions and Engagements selected on separate Y-axes (with Impressions as bars and Engagements as a line).

My question is, how do I use parameters and control filters (I assume I need to use both) in order to create a control filter so that a user can change the date group by which the data is broken out? In other words, I’d like a way for a user to see Impressions/Engagements broken out by either Day, Week, Month or Year, by manually selecting either Day, Week, Month or Year.

Additional information:

  • The dataset is SPICE type, and it’s the result of an SQL query that joins two databases that are pulled from Amazon AWS using Athena. The {Date} field is created using this line: CAST(a.date AS DATE) AS “Date”,
  • I tried asking ChatGPT, but it got hung up on setting up the parameter, kept wanting me to select a “Static Default Value” (when there is only a Dynamic Default Value option) and a “Values list” under Values (which doesn’t appear to be an option) when attempting to create a new Analysis parameter.

Hi @Austin165 ,

welcome to the community :tada:

This older post may help you: Changing Date Aggregation with Parameter - #7 by Max

Let me know, if this is the solution.

Best regards,

Nico

1 Like

Hi @Austin165

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

Hi @Austin165

Since we have not heard back from you, I’ll go ahead and close/archive this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!