Forum Discussion

Niki's avatar
Niki
Icon for Helper III rankHelper III
7 years ago
Solved

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

  • 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

3 Replies

    • Niki's avatar
      Niki
      Icon for Helper III rankHelper III

      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

  • Niki's avatar
    Niki
    Icon for Helper III rankHelper 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