# Dynamic params to use with Data Explorer

**URL:** <https://meta.discourse.org/t/dynamic-params-to-use-with-data-explorer/346502>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [January 10, 2025, 11:51am UTC](https://meta.discourse.org/t/dynamic-params-to-use-with-data-explorer/346502 "2025-01-10T11:51:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gormus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gormus/32/428592_2.png) [@gormus](https://meta.discourse.org/u/gormus)\
**Post date:** [January 10, 2025, 11:51am UTC](https://meta.discourse.org/t/dynamic-params-to-use-with-data-explorer/346502/1 "2025-01-10T11:51:12Z")

</div>

I have a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) report using 2 date parameters with hard-coded default values.

```sql
-- [params]
-- date :start_date = 2024-12-01
-- date :end_date = 2025-01-01

```

The hard-coded default values work for most of the parameter types, but for the date parameters, I wish we could set dynamic values, like the Monday of current week as the starting date, and the Friday of current week as the ending date:

```sql
-- [params]
-- date :start_date = cast(date_trunc('week', current_date) as date) + 0
-- date :end_date = cast(date_trunc('week', current_date) as date) + 4

```

^ this of course didn’t work.

I’d very much like to keep the same report with those exposed date params so that I can continue to run the report manually for different dates if I need to. But I also want to use the same report with Automation plugin for recurring post updates on a topic using the “Schedule a post in a topic with [Data Explorer](https://meta.discourse.org/t/32566?silent=true) results”.

Any suggestions how I could achieve this?

---

_[View the full topic](https://meta.discourse.org/t/dynamic-params-to-use-with-data-explorer/346502)._
