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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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