diff --git a/EmbedSample/Views/Dashboard/Report.cshtml b/EmbedSample/Views/Dashboard/Report.cshtml index 3e2e31e..48e1e96 100644 --- a/EmbedSample/Views/Dashboard/Report.cshtml +++ b/EmbedSample/Views/Dashboard/Report.cshtml @@ -30,6 +30,10 @@ +
+ + +

Filters

Add Filter

@@ -118,6 +122,16 @@ }); }); + // For a complete guide to page navigation see the following wiki page + // https://github.com/Microsoft/PowerBI-JavaScript/wiki/Handling-Events + report.on('dataSelected', + function (event) { + var data = event.detail; + var dataString = JSON.stringify(event.detail); + var resultsJSON = JSON.parse(dataString); + $("#dataselected-value").val(resultsJSON.dataPoints[0].identity[0].equals + " = " + resultsJSON.dataPoints[0].values[0].formattedValue); + }); + // For a complete guide to page navigation see the following wiki page // https://github.com/Microsoft/PowerBI-JavaScript/wiki/Page-Navigation function changePage(direction) {