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.
Hello there,
Few months ago POLITICO publised an nice data viz:
https://www.politico.eu/europe-poll-of-polls/european-parliament-elections-2019/
I would like to replicate it:
They have an EU page where show aggregate data. On the top there flags where you could select a Memeber States in order to drill-down on country level.
They change member states using the paramenter Country, therefore when they click Austria they go to the following link:
When they click Belgiumthey go to the following link:
and so on.
I know that there is a service url filter doc, see the link below
https://docs.microsoft.com/en-us/power-bi/service-url-filters
but they use another way to write the URL ==> URL?filter=Table/Field eq 'value'. I would like to have like POLITICO URL&Country=Austria
Does anyone know I could develop something like this?
Thank you very much for your example.
Salva
Hello anonymous, I'm exactly need the same as the Politico dashboard but could not find how to implement and made that filters works this way. I'm really wondering, did you find the answer and implement it accordingly ?
Hi @Anonymous ,
Embedding report with JavaScript can have the effect. You could try the script below :
function show(pageName, filterValue){ //Set the baseUrl to the embed url you get from the Power BI UI var newUrl = baseUrl + "&pageName=" + pageName; if(null != filterValue && "" != filterValue) {/code> newUrl += "&Country='" + filterValue + "'"; } //Assumes there’s an iFrame on the page with id="iFrame" var report = document.getElementById("iFrame"); report.src=newUrl; }
For more details, you could reference the blog : Easily embed secure Power BI reports in your internal portals or websites.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-xuding-msft ,
Thank you for your help, it is very help a lot.
Howerver, I was thinking to replicate the POLITICO page like this
https://app.powerbi.com/view?r=eyJrIjoiZTA5N2VkYWQtYmNiMS00YWFmLWEwZWQtOGY4MmExNTlmZjllIiwidCI6ImMyO...
&pageName=ReportSectionfc084e199e4490b57ced&Country=Spain
as you could see they have publish like "Public to web" so everyone could see the data and they have added a paramenter country where you could change from one to another member states.
Do know how I can create the parameter when I use "Public to web" as well?
Thanks,
Salva
Hi @Anonymous ,
As I known, URL parameters is not supported to "Publish to web". For now, there is no functionality to implement it directly. It needs us to develop with javascript like that website did.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |