cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wesleyrbk Frequent Visitor
Frequent Visitor

Get a value from Power BI Embedded

So I embedded a report and I would like to get a value from a card tile within the report for use outside the iframe. Is this possible?

2 REPLIES 2
Moderator Eric_Zhang
Moderator

Re: Get a value from Power BI Embedded


@wesleyrbk wrote:

So I embedded a report and I would like to get a value from a card tile within the report for use outside the iframe. Is this possible?


@wesleyrbk

You can more or less get a value by capture the "dataselected" event in Power BI Javascript API. However, per my test, it doesn't work for a card visual.

var reports = powerbi.embed(dashboardContainer, config);
	
reports.on('dataSelected', function(event)
{
var data = event.detail; 
         console.log(JSON.stringify(data, null, ' '));
		 
})
Highlighted
wesleyrbk Frequent Visitor
Frequent Visitor

Re: Get a value from Power BI Embedded

@Eric_Zhang Thanks for your answer.

 

What I'm trying to do is get the dates that are selected by a custom visual called: Time Brush Slicer. Now I already tried the dataselected on that visual but it didn't give anything in return. How should I approach this problem? I basically just need the start date and the end date of the filtered data. 

 

Edit: The custom visual performs a visual filter on the linechart. And as far as I know you can't get the filters on a visual level but only on report level. Am I right about that?

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 168 members 2,001 guests
Please welcome our newest community members: