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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ramesh_valluri
Frequent Visitor

GetData function in Power BI Embed

Team,

Can we get GetData option in PowerBI Embed?

If possible pls share the code or steps.

 

Thanks in advance,

Ram

1 REPLY 1
Anonymous
Not applicable

Hi, @ramesh_valluri 

 

You can use the GetData function in Power BI Embedded. Use the JavaScript API to retrieve data from a report, visual object, or page. The following is an example of how to retrieve data from a visual object using this function.

 

// Get a reference to the embedded report HTML element
var embedContainer = $('#embedContainer');

// Get a reference to the embedded report
report = powerbi.get(embedContainer);

// Get the first page of the report
report.getPages()
    .then(function (pages) {
        // Retrieve the data for the first visual on the first page
        return pages.getVisuals();
    })
    .then(function (visuals) {
        return visuals.getData();
    })
    .then(function (data) {
        // Log the data to the console
        console.log(data);
    });

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

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.

Top Kudoed Authors