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.
In SQL I can use SELECT @@servername to get the current server where query is running. Is there something similar in DAX where I can retrieve the server where a report is executing? I have a local (on my PC) Power BI Reporting Server installed. I also test reports on Dev Power BI servers. Currently working on a report that builds a URL via DAX and allows user to click on Power BI URL and a tab opens with a related SSRS details report. Current URL is being built with the value of the server hard coded, if possible would like to generate the parent section of URL dynamically. This is my current URL :
SSRS_Parent_URL = "http://someserver.local/ReportServer/Pages/ReportViewer.aspx?%2fTeam%2fMarketingReport&"
This is what I would like to accomplish :
SSRS_Parent_URL = ParentServer & "/ReportServer/Pages/ReportViewer.aspx?%2fTeam%2fMarketingReport&"
ParentServer would be a DAX measure that dynamically retrieves the underlying servername. Researched online, but till now I haven't found a viable solution.
Hi, I don't think it's possible to get the server name from DAX.
Perhaps you can
- Use relative URL:s? (skip the http://servername/ part)
- Add the server name to a settings table in the server and load it into the model using a localhost connection (if you have SQL running on the server / your machine).
How do you the the URL from the table and make it an active URL in PowerBI? Thanks.
Great idea. Unfortunately I can do this on my local computer, but not on the server (I don't have necessary permissions). Thanks for the input.
Do you know any way to retrieve environment variables via DAX? Thinking that it would be possible this way.
I think it would be useful, and doesn't hurt to be able to read environment variables. This is very common in other languages tools (VBA, .NET, JAVA, etc.). Anyway, thanks for your input.
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 |
---|---|
54 | |
26 | |
23 | |
15 | |
9 |
User | Count |
---|---|
77 | |
61 | |
47 | |
17 | |
12 |