Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
My organization is developing an integration which allows users to select data from a Power BI report user interface and generate a DAX query to the selected value.
We have observed that for simple objects, this is straightforward and works fine. We are able to retrieve the value easily for the Embedded Response.
However, there are cases which do not return this value and the documentation is elusive. What I would like to know is
For the front end we are using PowerBI Client React library: https://www.npmjs.com/package/powerbi-client-react
Solved! Go to Solution.
Hi @joshbrown ,
Thanks for reaching out to Microsoft Fabric Community and sharing the scenario.
From your description, it looks like you're embedding a Power BI report using the powerbi-client-react library and capturing selected values from visuals for further DAX query generation.
In many cases, capturing selected values works fine when the visual is based on model-bound fields and the selection clearly maps to a data identity. However, there are known limitations when interacting with certain visuals like matrices (especially totals or headers), KPIs, or custom visuals. These may not return the expected value in the selection response or may not emit a usable selection context at all. Additionally, as per official documentation, range and relative slicers are not supported for selection capture and won’t emit identity objects in the response. This behavior is expected and is documented here:
How to handle events in a Power BI embedded analytics application | Microsoft Learn
The ability to capture selected data usually depends on how the interaction is handled in the frontend. If you're using the JavaScript SDK event handlers (for example, something like the dataSelected event), the response can vary based on the visual and how the data is bound. Some visuals don’t expose identity or value in a way that can be retrieved through interaction alone.
A possible approach you can try is to use the getData() method on the visual instance after the user interaction. This method allows you to programmatically access the data behind the visual and may help retrieve the value even when it’s not directly returned in the selection event.
Currently, there is no complete public documentation listing which visuals are fully supported for selection capture. In general, standard visuals like bar charts, tables, and pie charts behave as expected, while some visuals like KPIs or matrix headers may not provide the desired selection output.
Some related discussions which you may find similar,
Solved: Power Bi embedded - interaction through dataSelect... - Microsoft Fabric Community
Power BI Embedded dataSelected event not triggered - Microsoft Fabric Community
Suddenly dataSelected event not getting fired for ... - Microsoft Fabric Community
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.
Hi @joshbrown ,
We’re following up regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.
If you still need assistance, please let us know.
Thank you.
Hi @joshbrown ,
Could you please let us know if your query has been resolved and if the response provided was helpful? Feel free to reach out if you need any further assistance.
Thank you.
Hi @joshbrown ,
Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries.
Otherwise, feel free to reach out for further assistance.
Thank you.
Hi @joshbrown ,
Thanks for reaching out to Microsoft Fabric Community and sharing the scenario.
From your description, it looks like you're embedding a Power BI report using the powerbi-client-react library and capturing selected values from visuals for further DAX query generation.
In many cases, capturing selected values works fine when the visual is based on model-bound fields and the selection clearly maps to a data identity. However, there are known limitations when interacting with certain visuals like matrices (especially totals or headers), KPIs, or custom visuals. These may not return the expected value in the selection response or may not emit a usable selection context at all. Additionally, as per official documentation, range and relative slicers are not supported for selection capture and won’t emit identity objects in the response. This behavior is expected and is documented here:
How to handle events in a Power BI embedded analytics application | Microsoft Learn
The ability to capture selected data usually depends on how the interaction is handled in the frontend. If you're using the JavaScript SDK event handlers (for example, something like the dataSelected event), the response can vary based on the visual and how the data is bound. Some visuals don’t expose identity or value in a way that can be retrieved through interaction alone.
A possible approach you can try is to use the getData() method on the visual instance after the user interaction. This method allows you to programmatically access the data behind the visual and may help retrieve the value even when it’s not directly returned in the selection event.
Currently, there is no complete public documentation listing which visuals are fully supported for selection capture. In general, standard visuals like bar charts, tables, and pie charts behave as expected, while some visuals like KPIs or matrix headers may not provide the desired selection output.
Some related discussions which you may find similar,
Solved: Power Bi embedded - interaction through dataSelect... - Microsoft Fabric Community
Power BI Embedded dataSelected event not triggered - Microsoft Fabric Community
Suddenly dataSelected event not getting fired for ... - Microsoft Fabric Community
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.
Hi @joshbrown ,
Your approach for retrieving selected values from Power BI reports using the Embedded Analytics API makes sense and matches how simple visuals (like tables or pie charts) are intended to work. For your specific questions:
For cases where selection on a visual doesn’t yield the expected data in the Embedded Data response:
This usually happens with visuals that do not fully expose their selection context through the API. Some visuals, especially custom visuals or complex ones, may only return partial context—like row/column indexes instead of the actual values. As a workaround, you might need to:
Regarding documentation for supported visual objects:
The official documentation doesn’t provide a full list of which visual types support complete selection data in the Embedded Analytics API. Generally, standard visuals (tables, matrices, basic charts) are well supported, but custom visuals and some advanced visuals may have limitations.
For your frontend, using the PowerBI Client React library is a solid choice.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
54 | |
29 | |
17 | |
14 | |
4 |
User | Count |
---|---|
60 | |
49 | |
25 | |
8 | |
6 |