1

I'm embedding a Wave Dashboard in a Lightning Page for an Account Record and need to filter based on the record I'm viewing. At the moment, I'm trying a filter like:

{ "My_Dataset_Name": { "DatasetColumnName": ['{!v.Name}'] } }.

However instead of pulling the Account Name using {!v.Name}, the filter just inserts the text "{!v.Name}". Any suggestions on how I can get it to reference the Name of the Account?

The documentation is linked below.

https://help.salesforce.com/apex/HTViewHelpDoc?id=bi_embed_lightning.htm&language=it_1

1

Only workaround I have found for this is to use a Visualforce page instead, here the filters work as expected.

1

To add a dashboard to your Lightning Page, select the Wave Dashboard component and then select the dashboard to display.

With the Filter attribute, you can use JSON to filter dataset fields at run time. For example:

{  
   datasetDeveloperName1:{  
      field1:[  
         value
      ]
   },
   datasetDeveloperName1:{  
      field1:[  
         value1,
         value2
      ],
      field2:[  
         "value3, with comma"
      ]
   }
}
0

You must use a filter like this one : {'datasets':{'account':[{'fields':['Name'], 'filter':{'operator': 'matches', 'values':['$Name']}}]}}

See Salesforce doc

0

Use filter like below

$A.createComponent(
            "wave:waveDashboard",{
                "recordId" : component.get("v.recordId"),
                "dashboardId": "0FK3i000000LrdVGAS",
                "height": "300",
                "hideOnError" : true,
                "showHeader": false,
                "showTitle": "",
                "filter": "{'datasets':{'Customer_Financial_Holdings':[{'fields':['FinServ__FinancialAccount__c.FinServ__PrimaryOwner__c'],'filter':{'operator':'in','values':['$Id']}}]}}"
            },
            function(newcomponent){
                if (component.isValid()) {            
                    component.set("v.body", newcomponent);      
                }
            } 
        );

Use directly in component also like

<wave:waveDashboard recordId="{!v.recordId}" dashboardId="0FK3i000000LrdVGAS" height="200" />

I hope this helps you

New contributor
user3670956 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.