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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Export Data API not working

I am trying to call the method 'visual.exportData' on visuals in my report which are cards and tables. The data it returns to me is the following:

 

{message: "Export data is not supported for this visual"}

 

 

Are cards and tables not supported by this API? If so, can we have the list of visuals that this API supports?

 

Moreover when I tried to simply run PowerBI's sample code for export data available at https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html# it threw the following 2 errors:

 

TypeError: Cannot read property 'Underlying' of undefined
at r.<anonymous> (reportembed.bundle.min.js:22)
at a (reportembed.common.bundle.min.js:16)
at Object.next (reportembed.common.bundle.min.js:16)
at n (reportembed.common.bundle.min.js:16)
at reportembed.externals.bundle.min.js:659
at m.$digest (reportembed.externals.bundle.min.js:670)
at reportembed.externals.bundle.min.js:673
at e (reportembed.externals.bundle.min.js:570)
at reportembed.externals.bundle.min.js:573
at t.invokeTask (reportEmbed.min.js:1)

 

AND

 

Unhandled Promise rejection: Cannot read property 'Underlying' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'Underlying' of undefined
at r.<anonymous> (reportembed.bundle.min.js:22)
at a (reportembed.common.bundle.min.js:16)
at Object.next (reportembed.common.bundle.min.js:16)
at n (reportembed.common.bundle.min.js:16)
at reportembed.externals.bundle.min.js:659
at m.$digest (reportembed.externals.bundle.min.js:670)
at reportembed.externals.bundle.min.js:673
at e (reportembed.externals.bundle.min.js:570)
at reportembed.externals.bundle.min.js:573
at t.invokeTask (reportEmbed.min.js:1) TypeError: Cannot read property 'Underlying' of undefined
at r.<anonymous> (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.bundle.min.js:22:454)
at a (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.common.bundle.min.js:16:27283)
at Object.next (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.common.bundle.min.js:16:26618)
at n (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.common.bundle.min.js:16:26350)
at https://app.powerbi.com/13.0.4898.201/scripts/reportembed.externals.bundle.min.js:659:168
at m.$digest (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.externals.bundle.min.js:670:130)
at https://app.powerbi.com/13.0.4898.201/scripts/reportembed.externals.bundle.min.js:673:157
at e (https://app.powerbi.com/13.0.4898.201/scripts/reportembed.externals.bundle.min.js:570:449)
at https://app.powerbi.com/13.0.4898.201/scripts/reportembed.externals.bundle.min.js:573:300
at t.invokeTask (https://app.powerbi.com/13.0.4898.201/scripts/reportEmbed.min.js:1:376613)

 

Please provide clarity regarding the usage of this API method

 

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @arvohra,

 

Please check if the report visual hit the limitation listed here: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Export-Data

 

Best Regards,
Qiuyun Yu 

emma_s
Helper I

Hi Qiuyun Yu,

 

I have the same problem. I have nowhere near 30k rows. I have 2 cards, one donut, and one column visual. They all throw the same error. Here is my code:

 

 

          var report = powerbi.embed(reportContainer, config);

          report.on("loaded", function (event) {
              report.getPages()
                  .then(function (pages) {
                      //Print each page and its visuals
                      pages.forEach(function (page) {
                          // console.log(page);
                          page.getVisuals()
                              .then(function (visuals) {

                              visuals.forEach(function(visual) {
                                  console.log(visual);

                                  visual.exportData(models.ExportDataType.Summarized, 100)
                                    .then(function (data) {
                                      console.log(data);
                                    })
                                    .catch(function (errors) {
                                      console.log(errors);//gives error "Export data is not supported for this visual"
                                    });

                                })

                              })
                        
                      })
                  });
          })

 

 

vincent_lepape
Regular Visitor

Hello

I have a similar issue :


{message: "ExportDataFailed", detailedMessage: "Export data is not supported for this visual", errorCode: undefined, technicalDetails: {…}}

 

When I try to call the function exportData when the visual is not fully loaded.

Report is loaded but not rendered. See : https://github.com/Microsoft/PowerBI-JavaScript/wiki/Handling-Events.

Regards

Vincent


E_Liu_Ha
New Member

Got similar same issue and noticed, that method ExportData fails every first time after using setPage method. I managed to circumvent the issue with catching the exception and making the second attempt of data export. Works fine.