Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 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?
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, ' '));
})
@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?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |