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.

Reply
AAjmi
New Member

Adding metadata to an embedded report

Hi!

I am currently developing a solution aiming to connect reports from Power BI into our application through the embedded API. We are attempting to tie event handlers from the embedded report into our own functionalities, but struggling with how we can create a "connection" between the selected data and the underlying data the report is built upon (ie. going from the dataset made for creating the report to our own azure table storage data in this case).

 

One early solution has been to connect the data from the dataSelected event to the underlying data through matching property names. This means exporting the underlying data as .csv and converting to JSON, getting the identity of the value selected in the report, and then connecting these together. The problem is this only really works when there is a 1:1 relationship between the selected data and the underlying data (such as a row in a database), and does not deal with things such as counts, aggregation, size of the dataset impacting performance etc.

 

Since we always have access to our own data in Azure Table Storage (and our goal is for the datasets and table storage to always be updated), a potential solution is to be able to tie our own specified metadata to the report itself, rather than relying on the underlying data made from the datasets. Assuming we could grab this metadata either from, let's say, the loaded event or dataSelected event (or any other event for that matter), then we could create all these connections ourselves in our own table/system. 

 

To further illustrate I can give an example of the types of things I would like to be able to solve, albeit not the best example I'm sure. Let's say I had a stacked column graph with transport options in a specific region, and one of the columns was a count of all busses, x-axis being the label "Bus" and Y-axis being the count. Each bus would correlate to 1 row in our Azure Table Storage, but aggregated in our dataset to simply be 1 row with the count already summed up. By clicking on this column in the embedded report, all busses counted in the column would have their location displayed on an interactive map, as all busses were saved with coordinates of their location. From the data selected event we know we clicked on the label "Bus", and we know the report itself is for a specific region. Then, we could have a separate table in our table storage that is somehow tied to the report metadata, like through having a similar partition key. In this table we could access with the metadata from the report, we would store the necessary query, or similar, to be able to get all the locations of all the busses (ie. get * from table where label = "Bus"). With all the locations of all busses, we now have what we need to display it in our solution.

 

The only issue I'm seeing is that there is no way to add this type of metadata to the report. A possible solution here would be to use some other type of static information about the report itself, such as the reportID, but for other scenarios I think metadata would be much better suited. Does such a thing exist?

 

tl;dr: Is it possible to add our own metadata to a report, and then access the metadata from an embedded instance through one of the event handlers?

 

Thanks!

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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