Skip to main content

How to resolve: Dashboards filters not applied, when query faceting is adjusted in CRM Analytics

Adding CRM Analytics Dashboards into the Salesforce Record Pages is an awesome functionality, but only if you can set up filters directly from App Builder. Which works fine until you need to adjust the faceting, for example, by excluding some queries. The issue is registered with Salesforce with no workaround. So, let’s figure the workaround out...

How to reproduce the issue

I have signed up for testing CRM Analytics org on Trailhead and created a sample App called "Customer Insights" with a dashboard named "Opportunities". On the dashboard there are two charts and one table, all based on the Opportunity SObject.

Dashboard is placed on the Account Record Page.

I want the two charts not to affect each other, but I need them to filter the table below. All widgets need to be filtered by Account Id from the Record Page. Therefore I am setting filter in the App Builder and removing faceting from the charts.

Do you see the result? Table is filtered by Account Id, but the charts are not.

Use Query on hidden page and binding to resolve the issue

All you need to do is create a hidden page with a Query that selects Account Id. In this query, we will not adjust the faceting, so the Record Page filter will limit the results of the Query to a single Account Id, the Id of currenct Account. Then, we will use binding to bring the filter to the charts visible to the customer.

  1. Create a new page called "Technical".
  2. Create any Query that selects Account Id, name it "CurrentAccount" and place it on the new page.
  3. Open both charts on the customer page and filter the chart by a random Account Id.
  4. Open the charts again, but this time in Advanced Editor.
  5. In the Advanced Interaction Editor:
    1. Select "CurrentCustomer" as the Source Query.
    2. Choose "Cell" for Data Selection.
    3. Set "0" for Row Index.
    4. Select "AccountId" for the Column.
    5. Leave "Result" as Interaction Type.
    6. Copy the formula in Created Interaction.
  6. Paste the resulting formula "{{column(CurrentAccount_1.result, [\"AccountId\"]).asString()}}" over the original Account filter.
  7. Save.
  8. Brag about your result!

Looking for an experienced Salesforce Architect?

  • Are you considering Salesforce for your company but unsure of where to begin?
  • Planning a Salesforce implementation and in need of seasoned expertise?
  • Already using Salesforce but not fully satisfied with the outcome?
  • Facing roadblocks in your Salesforce implementation and require assistance to progress?

Feel free to review my profile and reach out for tailored support to meet your needs!


About author

My photo
Jan Binder
Experienced Salesforce Technical Architect and Team Lead with a proven track record of delivering successful enterprise projects for major global companies across diverse industries, including automotive, oil & gas, and construction.