function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Garrett SamuelsGarrett Samuels 

Embedded Analytics Workaround Help

Hello, 

We are using Embedded Analytics to display two charts on the account detail page. Two is the maximum for this feature. I need to add a third chart, and found the solution to be quite simple, just create a visual force page with the below markup: 
<apex:page standardController="Account">
<analytics:reportChart reportId="00Oe0000000aeYn" size="small"></analytics:reportChart>
</apex:page>
Now that I have done that, I would like to be able to filter the chart/source report by the account the user is viewing. This is a built in functionality in Embedded Analytics. Does anybody know of some code I could add to the above to make the displayed chart filtered by the account the user is viewing? 

Your help is greatly appreciated!!

Thanks,

Garrett
Cory PerryCory Perry
Not sure if you ever figured this out, but here is an example of one that we use:
 
<analytics:reportChart reportId="00Oi0000005jhBz" cacheResults="true" size="medium" filter="[{column:'Order.Account.Id', operator:'equals', value:'{!Account.Id}'}]"></analytics:reportChart>

Maybe that will help you or others that might be trying to do this.