cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Microsoft Eric_Zhang
Microsoft

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, ' '));
		 
})
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
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!