Forum Discussion
mahoon
9 years agoNew Member
dataSelected on table
I have a powerbi embedded report that works fine -it renders as a table with a few columns . I would like to be able to click a row in the table and see the data related to that row. I have tried to ...
- 9 years ago
What visual do you click on? Based on my test, the Table and Matrix visual seem not having the dataSelected event. On other visuals, the dataSelected event can be fired.
report.on("dataSelected", function (event) { var data = event.detail; console.log(JSON.stringify(data)); });
the data JSON string
{
"report":{
"id":"719c43ad-xxx-4xxx9-8xx4-f79exxxxc1a6",
"displayName":"Pyrxxxxple"
},
"page":{
"name":"ReportSection",
"displayName":"Sample Dashboard"
},
"visual":{
"name":null,
"title":"Count of Opportunity by Region",
"type":"pieChart"
},
"dataPoints":[
{
"identity":[
{
"target":{
"table":"Account",
"column":"Region"
},
"equals":"Central"
}
],
"values":[
{
"value":null
}
]
}
],
"regions":null,
"filters":[
]
}So far, it is not possible to get the values, the data json doesn't have values at the moment and the PG team is working on it. Check this link.
Eric_Zhang
9 years agoMicrosoft Employee
What visual do you click on? Based on my test, the Table and Matrix visual seem not having the dataSelected event. On other visuals, the dataSelected event can be fired.
report.on("dataSelected", function (event) {
var data = event.detail;
console.log(JSON.stringify(data));
});
the data JSON string
{
"report":{
"id":"719c43ad-xxx-4xxx9-8xx4-f79exxxxc1a6",
"displayName":"Pyrxxxxple"
},
"page":{
"name":"ReportSection",
"displayName":"Sample Dashboard"
},
"visual":{
"name":null,
"title":"Count of Opportunity by Region",
"type":"pieChart"
},
"dataPoints":[
{
"identity":[
{
"target":{
"table":"Account",
"column":"Region"
},
"equals":"Central"
}
],
"values":[
{
"value":null
}
]
}
],
"regions":null,
"filters":[
]
}
So far, it is not possible to get the values, the data json doesn't have values at the moment and the PG team is working on it. Check this link.
mahoon
9 years agoNew Member
Thanks for the reply - yes I was using a table as the visual. I will check your link, thanks again.