Filter Dashboards with URL Parameters in Lightning Experience
There’s no need to set up the same filters each time you view your dashboard in Lightning Experience. Create a custom URL that includes the filter values. Then when you access the URL, your dashboard opens with the filters already set. For example, you can customize your Opportunity Stages dashboard with a different URL for each account owner. Or you can create a URL to zero in on the closed deals for a particular account.
Required Editions
| Available in: Lightning Experience |
| Available in: Essentials, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To add filters to dashboards you created: | Run Reports AND Create and Customize Dashboards |
| To add filters to dashboards you created in public folders: | Edit My Dashboards OR Manage Dashboards in Public Folders |
| To add filters to dashboards you didn’t create: | Manage Dashboards in Public Folders |
| To add filters to dynamic dashboards: | Manage Dynamic Dashboards |
- Start with a dashboard that includes the filters and values that you want to make available using the custom URL.
- Obtain the base URL for the filtered dashboard in either of the following ways:
Starting from What to do Analytics tab Open the dashboard from the Analytics tab. Click Share
. A window opens
to show the URL. Select the URL text and copy it to a text file.
Dashboards tab Open the dashboard. Copy the URL from your browser’s address bar and paste it into a text file. - Add the filter to the end of the URL. For example, the following URL sets Stage (the
first filter, or fv
0) to Closed Won and Account Name (the second filter, or fv1) to Acme.https://MyDomainName.my.salesforce.com/lightning/r/Dashboard/01ZRM0000005jrv2AA/view?queryScope=userFolders&fv0=Closed%20Won&fv1=Acme- The
&indicates a new parameter in the URL. If the base URL doesn’t already include a ? to indicate other parameters, use ? instead of&. - fv0 — fv stands for "filter value." The number represents
the order in which the filter appears in the dashboard. The first filter is
0, the second filter is1, and the third is2. - =Closed%20Won — Specifies the filter value. The parameter value must
be URI encoded, which means that certain characters (such as spaces) must be written
in a format that URLs can understand. For the filter value “Closed Won”, the space ('
') between "Closed" and "Won" becomes
%20when it’s URI encoded.
- The
- Navigate to the dashboard URL with the parameter appended.
When the dashboard opens, it opens with filter values applied.
These limitations apply to dashboard filter URLs:
- Dashboard filter URLs with the
equalsoperator are supported, but you can't create filter URLs with other operators such asless than,starts with, orcontains. - You can’t change the field being filtered using URL parameters.
- You can assign at most one value per filter. For example, you can include fv0=Acme in a filter URL but not fv0=Acme&fv0=Universal.
- You can't add new filters to dashboards using filter value URL parameters. You can only modify existing filters.
- You can’t delete filters from dashboards using filter value URL parameters. Setting a blank value filters by no text or numerals, but doesn’t remove the filter.
- Dashboard filter URLs aren't supported in Salesforce Classic.
- Dashboard filter URL parameters, such as fv0 and fv1, accept only values that are preconfigured in the dashboard's filter options. If you pass dynamic or arbitrary values that aren't in the filter options list, an invalid URL error appears. This behavior differs from report filter URL parameters, which accept valid values dynamically without preconfiguration.