Forum Discussion

mahoon's avatar
mahoon
New Member
9 years ago
Solved

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 ...
  • Eric_Zhang's avatar
    9 years ago

    mahoon

    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.