Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Niki
Helper III
Helper III

show report source in report

Hi all,

 

I have a powerbi report connected to a tabular model.

I would like to show in the report whether I am connected to the DEV or PROD model.

 

In order to do this, I need to somehow pick up the servername I am connected to in my report, with a measure.

 

I cannot find how to do this and can not find anyone with a similar problem. 

 

I understand that it would be a solution to create a parameter for this, but as I am connected to a tabular model, anything involving the queryeditor is not a solution.

 

Hope anyone can help.

 

Kind regards,

Niki

1 ACCEPTED SOLUTION
Niki
Helper III
Helper III

As I could not work properly with the provided 'solution' I fixed it in my tabular model. 

I do believe it should be easier to do so..

 

Username can easily be picked up with a function, something similar would be great to pick up servername/database/tabular

 

KR

View solution in original post

3 REPLIES 3
Niki
Helper III
Helper III

As I could not work properly with the provided 'solution' I fixed it in my tabular model. 

I do believe it should be easier to do so..

 

Username can easily be picked up with a function, something similar would be great to pick up servername/database/tabular

 

KR

TeigeGao
Solution Sage
Solution Sage

Hi @Niki ,

You can use the following query and then import it to PowerBI desktop.

Select CONNECTION_SERVER_NAME from $System.DISCOVER_DB_CONNECTIONS

Please refer to this blog to import the result to PowerBI Desktop:

https://biinsight.com/dax-measure-dependencies-in-ssas-tabular-and-power-bi/

Best Regards,

Teige

@TeigeGao,

 

I am really not a SQLexpert, so trying to follow your explanation, is not working for me.

 

Trying to import the query into my tabular model:

Select CONNECTION_SERVER_NAME from $System.DISCOVER_DB_CONNECTIONS

gives me an error on $System, am I supposed to put something else here?

 

when looking at the explanation of importing the result to power BI, it is using the import mode and the query editor, this is not possible right? As I have a live connection to the tabular model.

 

Kind regards,

Niki

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.