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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to get underlying data for a specific datapoint on context menu click

Hi, i am trying to get the datapoints and its underlying data for that specific selected datapoint. At present it only exposes the data in the in the visual. i am using the following type script code to get the data points. Please help me to grab the relevant data.

 

report.off("commandTriggered");

// report.on will add an event handler to commandTriggered event which prints to console window.
report.on("commandTriggered"function (event) {
    let commandDetails = event.detail;
    console.log(event);
    console.log("Event - commandTriggered:\n", commandDetails);
});
report.off("commandTriggered");

// report.on will add an event handler to commandTriggered event which prints to console window.
report.on("commandTriggered"function (event) {
    let commandDetails = event.detail;
    console.log(event);
    console.log("Event - commandTriggered:\n", commandDetails);
});
2 REPLIES 2
sanketpathre
New Member

How to detect which context menu is click. For example, I want to add some extra logs to check which users request "Export Data". I want to know when Export data is click by End user. Is there any way on client side to check Export data is trigger.

Anonymous
Not applicable

Hi @Anonymous ,

Do you want to export the data from the Power BI visual? Could you please more details on your requirement? Thank you.

Export data from a visual

yingyinr_0-1664162710116.png

Best Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.