March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am getting into creating custom visuals using SVG code in measures using the "Image URL" as the Data Category. I am struggling to get hyperlinks to be recognised inside the SVG though. For example, I have a measure that has some text inside an <a> tag like the below:
test svg =
VAR _svg = "data:image/svg+xml;utf8, <svg height=""600"" width=""200"" xmlns=""http://www.w3.org/2000/svg""><a href=""https://www.w3schools.com/"" target=""_blank"" onclick=""window.open('print.html', 'newwindow', 'width=300,height=250'); return false;""><text x=""0"" y=""30"" fill=""red"" font-size=""30"">CLICK HERE!</text></a></svg>"
RETURN _svg
This displays as expected when dragged into a matrix or table, but when Ihover over the CLICK HERE! text it doesn't recognise the hyperlink. I have tried publishing to Power BI service also, but the same issue is there. Is this functionality not supported in Power BI yet?
Thanks
Thanks @rajendraongole1. I think that would still not allow me to the functionality into the matrix, so for now I am going to stick with the Web URL measure and hope that Microsoft open up the SVG functionality at a later date. Thanks for your advice though 👍
Hi @robmarsh ,
Glad to hear you may have found a solution! If you're sure the issue has been resolved, could you mark this post as resolved? That way, others with similar issues can more easily find a solution and the community can see that the issue has been resolved.
Thanks, and feel free to reach out if you need further help!
Thanks for your reply @rajendraongole1. Buttons won't work in this scenario, as I need to create a dynamic button where the URL changes and add it into a matrix.
It's strange that the functionality is limited for security reasons, as the funtionality is very similar to creating a Web URL measure. This incidentally does work, except I wanted a way to create something that looked like a button. Also, I haven't found a way yet of forcing Web URL links to open in a new window rather than a new tab on the existing window. Does anyone know how to do that?
Hi @robmarsh -For now, you’ll need to rely on the Web URL measure and accept that it opens in a new tab or explore Power Apps if you need full control over button appearance and hyperlink behavior. Unfortunately, due to Power BI's current security constraints, finer control over link behavior (like forcing a new window) is unavailable directly within Power BI visuals.
Alternative Solution:
Power Apps provides more flexibility, allowing for custom-styled buttons that can open URLs in a new window.
You could create buttons with dynamic URLs based on Power BI data, and configure them to open in a new browser window.
Proud to be a Super User! | |
Hi @robmarsh - Unfortunately, if you’re looking for true hyperlink functionality directly in SVG-based visuals within measures, this isn’t supported in Power BI due to security and performance restrictions on interactive content.
suggest an alternative:
You can use buttons or images in Power BI that link to external content via the action feature. While it doesn’t provide the same customization as SVGs, it can be an alternative if your goal is to navigate to a URL.
Hope this information helps.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |