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
Anonymous
Not applicable

How to pass server name in a sql query

Hello,

 

I have developed a dashboard which contains  the following tables:

 

Key measure

Sql Agent Job

Sql Agent Jobs History

Sql Agent Jobs Steps

SQL Agent Job Steps History

 

My client is very statisfy about the dashboard.

 

Now the client would like to produce the same dashboard but for two other servers.

I have made some preliminary tests and when I connect to the two other servers, my SQL scripts (those I use in Power BI) works perfectly.

 

So, I have few options to add two other servers.

I could make a copy of the three tabs so at the end I will have nine tabs (3 tabs per server).

 

The other option I have in mind will be to create a Server Slicer and use it as a parameter (if it is possible to do so), the pass the server name to the SQL Script and produce a dashboard but only for the selected server.

 

So is it possible to create a list of server as Parameter, to link this parameter to a slicer and to pass the server name into the SQL Script and most important, how do we do that.

 

Thank in advance for your help.

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

I find that you are already working on Parameter now from your newest post. 

And here are some documents may help you.

Power BI Introduction: Working with Parameters in Power BI Desktop —Part 4

Power BI Desktop Query Parameters, Part 1

Power BI Desktop Query Parameters, Part2 – Dynamic Data Masking and Query Parameters

Parameterize your data source!

 

Wish you all the best.

 

Best Regards,
Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Icey
Community Support
Community Support

Hi @Anonymous ,

I find that you are already working on Parameter now from your newest post. 

And here are some documents may help you.

Power BI Introduction: Working with Parameters in Power BI Desktop —Part 4

Power BI Desktop Query Parameters, Part 1

Power BI Desktop Query Parameters, Part2 – Dynamic Data Masking and Query Parameters

Parameterize your data source!

 

Wish you all the best.

 

Best Regards,
Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.