Einstein analytics dashboards into Visualforce pages

Embedding Wave dashboard into a visualforce page

Salesforce out of the box supports embedding the einstein analytics dashboards into a custom visualforce pages using <wave:dashboard/>  vf tag passing the dashboard id. This tag will create an iframe and dashboard will render inside an iframe. We can also explore and drill down the data in that iframe. we can also set the width, height and wave dashboard properties.

Simple visualforce page to display wave dashboard:

<apex:page>
    <wave:dashboard dashboardId="0FK7F000000GDe0WAG" showHeader="false" openLinksInNewWindow="false" showTitle="false" showSharing="false"/>
</apex:page>
Here dashboardId is mandatory and rest of the attributes are optional. To get the dashboard id --> first open the dashboard then view the url, in that one id starts with 0FK that is dashboard id.
showHeader: Show/hide the header of the dashboard.
openLinksInNewWindow: On clicking the dashboard links open that in the same window or new window.
showTitle: Show/hide the title of the dashboard.
showSharing: show/hide the dashboard sharing button.

Dynamically filter the dashboard to Opened record:

Above dashboard shows the all the data. But here we are going to filter the data related to that opened record only. 
Ex: we have a dashboard to show the data for all accounts and contacts. I want to see data related to an opened account. 
so we will create a visaualforce page to embed dashboard then dynamically add a filter to display related to that record. and add this visualforce page into record view page layout. 
Syntax for filter json code:

Syntax for selection json code:

so here we are passing the id of the record to saql query to filter the data.
<apex:page standardController="Account" sidebar="false">
    <wave:dashboard dashboardId="0FK7F000000GDe0WAG" showHeader="false" openLinksInNewWindow="false" showTitle="false" showSharing="false" filter="{'datasets':{'AC_Con_Opp':[{'fields':['AccountId'],'filter':{'operator':'matches','values':['{!Account.id}']}}]}}"/>
</apex:page>

COMMENTS

Name

Apex,6,Batch Apex,2,Chrome Add-on,1,Chrome browser,1,Coding Best Practices,2,CRM Basics,1,cURL,1,Database Query,1,Dataset,1,Dynamic Apex,3,Dynamic SOQL,1,Einstein Analytics,9,Future Apex,1,Git,1,Google Chrome,1,JS for LWC,6,Lightning Components,2,lightning Page,1,Lightning Web Components,13,Linux for Windows users,1,LWC,2,Queueable Apex,1,Redirect page,1,REGEX,1,REST API,1,Salesforce CRM,1,Salesforce Errors,1,Salesforce Interview Questions,13,Salesforce Lightning,1,Salesforce New Features,1,Salesforce Tasks,2,Schedule Apex,1,Test Class,1,Triggers,1,Visualforce Pages,3,Visualforce Pagination,2,VS Code,2,Wave Analytics,7,Winter Release Notes,1,workbench,1,
ltr
item
SWDC WORLD (Software Development Center Of The World) - is a Multi author and Multi Technology Blog: Einstein analytics dashboards into Visualforce pages
Einstein analytics dashboards into Visualforce pages
Einstein analytics dashboards into Visualforce pages,Embedding Wave dashboard to visualforce page
SWDC WORLD (Software Development Center Of The World) - is a Multi author and Multi Technology Blog
https://swdcworld.blogspot.com/2019/07/einstein-analytics-dashboards-into.html
https://swdcworld.blogspot.com/
https://swdcworld.blogspot.com/
https://swdcworld.blogspot.com/2019/07/einstein-analytics-dashboards-into.html
true
5370056087523941001
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy