Hi,
I have embedded a powerBI report with JavaScript and I am able to set a function that gives me the event.detail data printed out to a separate div element.
This is the function that does this:
//This function run when data is selected in my embedded PowerBI report
function initializeDataSelection(report, $dataSelectedContainer) { report.on('dataSelected', event => { var data = event.detail; $dataSelectedContainer.text(JSON.stringify(data, null, ' ')); }); }
When I click on some data in my PowerBI report, the following is printed out to my dataSelectedContainer div:
{ "report": { "id": "6f627931-462b-4f14-9803-e3be1b53caa2", "displayName": "RISK PLL" }, "page": { "name": "ReportSection", "displayName": "Summary PLL" }, "visual": { "name": null, "title": "Select Leak Size", "type": "slicer" }, "dataPoints": [ { "identity": [ { "target": { "table": "MyQRA RiskPLL", "column": "LeakSize" }, "equals": "L" } ],"values": [] } ], "regions": null, "filters": [] }
The data i need is the dataPoint "values": [] (shown in red above)
Questions:
1. Is this feature not supported yet?
2. Is this the wrong object to use to retrieve the dataPoints[0].values array?