Forum Discussion
ahpitre2
6 years agoFrequent Visitor
Retrieve server name in DAX
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 (o...
Anonymous
6 years agoNot applicable
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).
ahpitre2
6 years agoFrequent Visitor
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.