# URL Filter Parameters to filter a dashboard dynamically right away

**URL:** <https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753>\
**Category:** Feature Suggestions\
**Tags:** dashboard, filters\
**Created:** [February 23, 2022, 11:59am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753 "2022-02-23T11:59:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [February 23, 2022, 11:59am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/1 "2022-02-23T11:59:56Z")

</div>

Hi all,

A feature suggestion I would like to put forward is the ability to pass in a filter value in the URL.

I would imagine this to be something like:

> **[Holistics - Modern Self-service BI Platform](https://secure.holistics.io/users/sign_in)**

This way you can launch a Holistics dashboard from another app, or provide a link to your users so they can jump right into a dashboard with context, rather than having to apply their own filters time after time.

This may feed into the existing feature request:

> [@Query Parameters for Dynamic Dimensions, Measures, and more](https://community2.holistics.io/t/query-parameters-for-dynamic-dimensions-measures-and-more/686):
>
> Update: See upcoming feature announcement of [Dynamic Models](https://community2.holistics.io/t/upcoming-launch-dynamic-models-aka-query-parameters/1341). Problems and Use-cases Dynamically modifying the query result returned from data exploration according to dashboard input. Use-cases [How to dynamically change column that is used for a measure based on a filter/parameter](https://community2.holistics.io/t/how-to-dynamically-change-column-that-is-used-for-a-measure-based-on-a-filter-parameter/678)[More Control on Dashboard Date Filters - Feature Suggestions](https://community2.holistics.io/t/more-control-on-dashboard-date-filters/706/2)[Accepting user input variables in reports in 2.7 / 3.0](https://community2.holistics.io/t/accepting-user-input-variables-in-reports-in-2-7-3-0/495) Create Reusable Fitler Group - [Reusable filters - aka filtergroups](https://community2.holistics.io/t/reusable-filters-aka-filtergroups/705)[More Control on Dashboard Da…](https://community2.holistics.io/t/more-control-on-dashboard-date-filters/706/6)

But I wanted to ensure this was raised and taken into account, especially if different.

---

<div class="post-metadata">

**Author:** ![Abdel](https://community.holistics.io/user_avatar/community.holistics.io/abdel/32/299_2.png) [@Abdel](https://community.holistics.io/u/Abdel)\
**Post date:** [February 23, 2022, 12:45pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/2 "2022-02-23T12:45:20Z")

</div>

Hi @DataGeekDude  
Interesting. I think this one is most likely covered by the feature request:

> [@Dashboard Views](https://community2.holistics.io/t/dashboard-views/694):
>
> Problems I want to save and switch between different states of a dashboard easily Each person might have different needs that require different views on the same dashboard Proposed Solution Allow users to create views for dashboards, each view has its own configurations of filters, date drills, etc. [image] Another approach is Filter Groups which allows users to select a group of preset filters. Inspirations: Notion, Coda, AirTable

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [February 23, 2022, 1:19pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/3 "2022-02-23T13:19:31Z")

</div>

Thanks Abdel, however I think it isn’t fully covered as you wouldn’t want to create a view ahead of time on a dashboard, but allow that to be dynamic and be pushed in by an external system. Lots of BI tools allow this, even Google Data Studio provides this ability.

I wouldn’t want our users to have to go into Holistics to create a view with it’s own configuration etc. and then save the URL, that defeats the purpose of it being dynamic as far as I can see.

However, I may be reading the above link slightly wrong and this is what is intended.

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [April 26, 2022, 7:59am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/4 "2022-04-26T07:59:42Z")

</div>

@Khai_To Sorry for the direct tag on this one, but I am currently getting asked quite regularly on this functionality.

The main reason for us to have this is to “embed” links in other tools and allow those links to be opened with context i.e. our support/coaching team opening a link for one of our members pre-filtered via a URL parameter linked to a filter. This means they can open several tabs at the same time, just by clicking on a link, and getting the information right away.

There are many other reasons but this is the latest one which has been requested and at the moment we are looking to implement this in Google Data Studio instead, which does support this functionality 😭

---

<div class="post-metadata">

**Author:** ![Khai\_To](https://community.holistics.io/user_avatar/community.holistics.io/khai_to/32/128_2.png) [@Khai\_To](https://community.holistics.io/u/Khai_To)\
**Post date:** [April 26, 2022, 4:09pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/5 "2022-04-26T16:09:06Z")

</div>

Hi @DataGeekDude,

Totally understand your use case and concern.  
For now, all the filter value applied in the dashboard cannot be controlled via the URL but there are 2 options that I have thought of after the discussion with my engineering team

**Option 1** (Not supported yet): We can expose the API for you to build filter URL parameter (the `fstate` param). Since this is not supported yet, we will consider this as a feature request and need to add to backlog for prioritization. I will check the ETA with team but it could be at around 3-4 weeks.

**Option 2** (Workaround): You can generate the [Embed Link](https://docs.holistics.io/docs/embedded-analytics/filter-display-settings) for this use case. This option might require more effort from your side. Also, the embed links currently are not able to handle too many settings so if your dashboard has vast amount of filters, this option might not work.

What do you think? Which option will suit you?

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [April 27, 2022, 7:43am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/6 "2022-04-27T07:43:51Z")

</div>

Hi Khai,

Thanks for the reply and detailed info.

We would like to put in the feature request for the `fstate` param please. I believe this would be the best solution and open up a great deal of flexibility in Holistics.

Thanks!

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [April 27, 2022, 7:48am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/7 "2022-04-27T07:48:36Z")

</div>

Also, is it possible to get more details on what and how the `fstate` param would work? i.e. if you want to build a URL dynamically, how would that work?

---

<div class="post-metadata">

**Author:** ![Khai\_To](https://community.holistics.io/user_avatar/community.holistics.io/khai_to/32/128_2.png) [@Khai\_To](https://community.holistics.io/u/Khai_To)\
**Post date:** [April 28, 2022, 3:18am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/8 "2022-04-28T03:18:03Z")

</div>

Hi @DataGeekDude,

You can refer to our drafted API definition below:

**Input** :

- `data`: array of these filter state objects
  - `dynamic_filter_id`: Id or uname of the filter
  - `selected_condition`: [Holistics API | Holistics Docs](https://docs.holistics.io/api/v2#section/DataModelingCondition)

**Output** :

- `fstate` value

Then to construct the URL:  
`https://secure.holistics.io/dashboards/` `<holistics_dashboard_version>/<dashboard_id>?fstate=<fstate_value_returned_by_api>`

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [April 28, 2022, 7:42am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/9 "2022-04-28T07:42:12Z")

</div>

That would be great! I think this would work great for us

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [June 19, 2023, 2:24pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/10 "2023-06-19T14:24:49Z")

</div>

Hi @Khai_To

Can I check if this ever went onto the backlog and the likelihood of this being done?

We have a lot of use cases for this and it is IMO a basic feature that all BI tools should (and usually do) support.

---

<div class="post-metadata">

**Author:** ![Khai\_To](https://community.holistics.io/user_avatar/community.holistics.io/khai_to/32/128_2.png) [@Khai\_To](https://community.holistics.io/u/Khai_To)\
**Post date:** [June 22, 2023, 4:40am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/11 "2023-06-22T04:40:37Z")

</div>

Hi @DataGeekDude,

Yes, this has been added to our backlog and our development team is actively researching it.

I totally understand this feature has taken longer than expected to implement and release but we want to make sure your experience with it is seamless.  
The expected timeline would be **at around 1-2 weeks**.

I will let you know when there is an update from my engineering team.

Thank you,

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [June 22, 2023, 1:03pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/12 "2023-06-22T13:03:27Z")

</div>

Thanks @Khai_To, I appreciate your update

---

<div class="post-metadata">

**Author:** ![datbth](https://community.holistics.io/user_avatar/community.holistics.io/datbth/32/1414_2.png) [@datbth](https://community.holistics.io/u/datbth)\
**Post date:** [July 1, 2023, 12:40am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/13 "2023-07-01T00:40:26Z")

</div>

Hi Craig,

I’m glad to announce that Holistics has just released the API that allows users to generate Dashboard URLs dynamically based on the preset filters: [https://docs.holistics.io/api/v2#tag/Dashboards/operation/Dashboards\_BuildUrl](https://docs.holistics.io/api/v2#tag/Dashboards/operation/Dashboards_BuildUrl) 🎊

Please give the API a try and let us know whether it suits your needs.

Cheers!

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [July 17, 2023, 1:20pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/14 "2023-07-17T13:20:24Z")

</div>

Thanks @datbth thats really useful to see.

I had a look at the API docs, but is there any documentation on some examples of using this API?

---

<div class="post-metadata">

**Author:** ![datbth](https://community.holistics.io/user_avatar/community.holistics.io/datbth/32/1414_2.png) [@datbth](https://community.holistics.io/u/datbth)\
**Post date:** [July 17, 2023, 1:35pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/15 "2023-07-17T13:35:11Z")

</div>

Hi Craig,

Currently, there isn’t a full tutorial for this exact API yet.

But here is a quick example request:

 ![image](https://community.holistics.io/uploads/default/original/2X/5/574005d525932692b1dcaf3b986912b1bd303265.png)  
 ![image](https://community.holistics.io/uploads/default/original/2X/a/a64259b0d744bb023c3e073234b0b21f74f7a35e.png)

May I ask which specific parts/steps are you having issues with, so that we can try to provide better examples/documentations for you?

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [July 17, 2023, 2:04pm UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/16 "2023-07-17T14:04:23Z")

</div>

> [@datbth](#):
>
> May I ask which specific parts/steps are you having issues with, so that we can try to provide better examples/documentations for you?

It was really just getting started and how to proceed with the API as I wasn’t sure how the API would work to be honest.

---

<div class="post-metadata">

**Author:** ![datbth](https://community.holistics.io/user_avatar/community.holistics.io/datbth/32/1414_2.png) [@datbth](https://community.holistics.io/u/datbth)\
**Post date:** [July 18, 2023, 2:28am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/17 "2023-07-18T02:28:56Z")

</div>

Hi Craig,

While we are working on possible improvements to our docs, would you mind taking a look at this [Get Reporting Data via API tutorial](https://docs.holistics.io/api/v2#section/Get-Reporting-Data-via-API/Steps)?  
You can follow the exact first 3 steps, then

- Step 4: Here is my version of step 4 for the build\_url API  

- Step 5: Please omit step 5 and use the URL returned from step 4

---

<div class="post-metadata">

**Author:** ![datbth](https://community.holistics.io/user_avatar/community.holistics.io/datbth/32/1414_2.png) [@datbth](https://community.holistics.io/u/datbth)\
**Post date:** [July 18, 2023, 2:47am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/18 "2023-07-18T02:47:33Z")

</div>

Here is my codes for step 4:

```ruby
class HolisticsAPI
  # ...

  # @return [string] the Dashboard URL that has been built
  def build_dashboard_url(dashboard_id, filter_states: [])
    url = @api_url + "/dashboards/" + dashboard_id.to_s + "/build_url"

    response = @http.post(url, json: { filter_states: filter_states })
    res = JSON.parse(response.to_s)

    if response.code == 200
      res['dashboard_url']
    else
      raise StandardError.new(res['message'])
    end
  end
end

# call the method to make request
filter_states = [
  {
    dynamic_filter_id: 2335, # Filter ID acquired from step 3
    condition: {
      operator: 'matches',
      values: [
        'last 2 months'
      ]
    }
  }
]
dashboard_url = build_dashboard_url(123, filter_states: filter_states)

```

---

<div class="post-metadata">

**Author:** ![DataGeekDude](https://community.holistics.io/user_avatar/community.holistics.io/datageekdude/32/430_2.png) [@DataGeekDude](https://community.holistics.io/u/DataGeekDude)\
**Post date:** [July 25, 2023, 7:59am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/19 "2023-07-25T07:59:42Z")

</div>

Thanks for the additional detail. We will look to try this out internally at some point in the near future.

---

<div class="post-metadata">

**Author:** ![di.hoang](https://community.holistics.io/user_avatar/community.holistics.io/di.hoang/32/421_2.png) [@di.hoang](https://community.holistics.io/u/di.hoang)\
**Post date:** [June 7, 2024, 4:01am UTC](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753/20 "2024-06-07T04:01:41Z")

</div>

Hi @DataGeekDude,

We’re thrilled to announce that our team has release the [URL Parameters](https://community2.holistics.io/t/launched-passing-filter-parameters-via-url-query-string/1954) today 🚀

From now on, you can easily pre-fill filters, period-over-period comparison, and date-drill by **adding string parameters** to the dashboard URL.

For more information, please visit our public documentation here: [Passing Filter Parameters via URL Query String](https://docs.holistics.io/docs/url-parameters)😊

[Next page](https://community.holistics.io/t/url-filter-parameters-to-filter-a-dashboard-dynamically-right-away/753.md?page=2)
