How to show in a card the server name

Hello all,
I am working on a report and as I am developing it, I am looking for feedback from different clients by sharing it.

Information is on one server but databases are different for each client.

I would like to show in one card the name of the data base (client Name)to avoid any confusion.

Any idea how to do it ?
Thanks,

Hi @ezenunez,

Create something like the below in the query editor, call it DataBaseSource or whatever, then reference it in a visual in our report. You can rename MySources, but for the other two make sure to put in the names of your Parameters in between the quotes.

let
    Source = #table ( {"Source", "Server", "Database"},
        {
            {"MySources", #"ServerParameterName", #"DatabaseParameterName"}
        }
    )
in
    Source

Thanks Melissa!
It works!
What about if I want to pull the name of the data base i am using?

Hi @ezenunez Itā€™s great to know that you are making progress with your query. Please donā€™t forget if your question has been answered within the forum it is important to mark your thread as ā€˜solvedā€™. Also, weā€™ve recently launched the Enterprise DNA Forum User Experience Survey, please feel free to answer it and give your insights on how we can further improve the Support forum. Thanks!

You can keep adding fields and values if you needā€¦

let
    Source = #table ( {"Source", "Server", "Database", "NewColumnNameHere"},
        {
            {"MySources", #"ServerParameterName", #"DatabaseParameterName", #"NewParameterNameHere"}
        }
    )
in
    Source

Thanks Melissa,
Sorry, I might not explain myself well.
I am looking to "retrieve or read ā€œthe name of the data base I am using.
Is there any Power Query M Function for that ?
If can read it, them I want to insert as # DatabaseParameterNameā€ to later use it in my virtualizationā€¦

The end goal is to be able in the visualization what database I am usingā€¦
Thanks again

Hi @ezenunez,

Iā€™m sorry but I donā€™t follow, weā€™re still talking database right - not companies?
If so than you should have a Parameter set up for the Database, just pass that Parameter to the #table, in order to ā€œreadā€ itā€™s value.

Let me explain myself again.
I am currently developing reports in Power BI that will be use for different companies.

The information comes from our Server, we DirectQuery.

Each company has its own database in our server, all the database has exactly the same structure.

We are currently looking for feedback from the clients.

To be able to do this, I am just Connecting the same PBIX to the client database and them save the file pbix file with different name and share it.

image

My concern is not mix the databases with clients.
So, I would like the ā€œreadā€ what database I am using it and show that onemy report .

I am looking to replicate what you do in Words files when in the footer you insert ā€œthe file,ā€ or date, etc

image

I hope now it makes sense!

Thanks for the patience!

Hi Melisa,
I found a table on the database that has the company name.
I can now pull it from there.
Thanks,

1 Like