0

I have Embedded Power BI Report published online on my website(localhost). The main aim is to extract data from the report with some action. For instance there is an option to add new menus to the reports which can provide this action feature.

Sample Menu

I have used a dynamic configuration which sets configuration for powerBI report object.

        report.on("commandTriggered", function(command) {     
            console.log(command.detail.datapoints)
        });

The datapoints seem to be empty in this situation for any clicked chart. How do i get the datapoints or I need the datapoints for the specific chart when custom command is performed.

1 Answer 1

1

Context menu extensions do not return data points, as there is no data point selected.

if you were to right-click on a data point and click your extension in the menu that'd pop out - you'd get it.

There is a coming feature that'll enable you to get the data from all the visual, coming soon..

Update

Export data from visual has just come out :) https://github.com/Microsoft/PowerBI-JavaScript/wiki/Export-Data

You can easily export a visuals data using:

// Exports visual data
    visual.exportData(models.ExportDataType.Summarized, rowsNumber)
      .then(function (data) {
        Log.log(data);
      })
      .catch(function (errors) {
        Log.log(errors);
      });

or get the underlying data using models.ExportDataType.Underlying instead of Summarized

Sign up to request clarification or add additional context in comments.

4 Comments

I had been breaking my head. Even though the right-click doesn't get's all the datapoint. After all, I came to know that this isn't available at all. Hopefully, it is coming in quick.
It was just published :)
I am badly looking for this visual object. How do i get hold of this one?
Take a look at aka.ms/pbijs at the Embed Visual section.. There you’ll find a code sample for traversing through the report pages and visuals

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.