Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
JohnKris
Advocate II
Advocate II

event.detail object does not give me dataPoints values

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": "anonymized",
    "displayName": "anonymized"
  },
  "page": {
    "name": "ReportSection",
    "displayName": "anonymized"
  },
  "visual": {
    "name": null,
    "title": "anonymized",
    "type": "slicer"
  },
  "dataPoints": [
    {
      "identity": [
        {
          "target": {
            "table": "anonymized",
            "column": "anonymized"
          },
          "equals": "TESTVARIABLE"
        }
      ],
      "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?

 

1 ACCEPTED SOLUTION


@JohnKris wrote:

Thanks for the update.

 

Two questions:

1. Could you ask the development team for a date/week as to when the **values** array will be fixed?

2. Is it possible to catch deselect event? (when you click e.g. a bar graph the first time it, and then clicking it again, i.e. deselecting)

 

Thanks!


1.We don't contact the development team directly, to get any update, you can follow the bug track on github.

2.So far it seems impossible. I'm going to escalate a content request for more detailed documents on Power BI Javascript API.

View solution in original post

3 REPLIES 3
Eric_Zhang
Microsoft Employee
Microsoft Employee

@JohnKris

 

That is a feature not implemented yet. Check "**values** array (In Progress)" at Handling Events. The development team said it will take at least a few weeks until a fix gets to production.
 

 

Thanks for the update.

 

Two questions:

1. Could you ask the development team for a date/week as to when the **values** array will be fixed?

2. Is it possible to catch deselect event? (when you click e.g. a bar graph the first time it, and then clicking it again, i.e. deselecting)

 

Thanks!


@JohnKris wrote:

Thanks for the update.

 

Two questions:

1. Could you ask the development team for a date/week as to when the **values** array will be fixed?

2. Is it possible to catch deselect event? (when you click e.g. a bar graph the first time it, and then clicking it again, i.e. deselecting)

 

Thanks!


1.We don't contact the development team directly, to get any update, you can follow the bug track on github.

2.So far it seems impossible. I'm going to escalate a content request for more detailed documents on Power BI Javascript API.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.