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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mlm
New Member

Paginated reporting -dynamic db parameters - deployment pipeline rules

Hi,

I have a paginated report with teradata datasource.

  -- do we have any specific syntax to use  Power BI Parameters ?

-- how can we switch database between dev/uat/prod using parameters ?

 

any reference is greatly appreciated.

thanks

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

Hi, @mlm 

 

Based on your description, to use Power BI parameters for a Teradata data source, you can perform the following steps.

1. Create the parameter in Power BI. For example, you can create a parameter for the database name.
2. In the Power Query editor, you can merge these parameters into SQL queries. For example, if the database name has a parameter, you can use this parameter in the clause of the SQL query.

Example:

let
    Source = Sql.Database ("servername", "databasename", [Query="SELECT * FROM tablename WHERE columnname = '" & ParameterName & "'"])
in
    Source

Related link: Solved: Include Parameters within Power BI to Query a SQL ... - Microsoft Fabric Community

To switch between databases (dev/uat/prod) using a parameter, you can create a parameter for the database name and then use this parameter in the SQL query. When you want to switch databases, just change the value of the parameter.

let
    Source = Sql.Database ("servername", ParameterName, [Query="SELECT * FROM tablename"])
in
    Source

 Related link: Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
v-yaningy-msft
Community Support
Community Support

Hi, @mlm 

 

Based on your description, to use Power BI parameters for a Teradata data source, you can perform the following steps.

1. Create the parameter in Power BI. For example, you can create a parameter for the database name.
2. In the Power Query editor, you can merge these parameters into SQL queries. For example, if the database name has a parameter, you can use this parameter in the clause of the SQL query.

Example:

let
    Source = Sql.Database ("servername", "databasename", [Query="SELECT * FROM tablename WHERE columnname = '" & ParameterName & "'"])
in
    Source

Related link: Solved: Include Parameters within Power BI to Query a SQL ... - Microsoft Fabric Community

To switch between databases (dev/uat/prod) using a parameter, you can create a parameter for the database name and then use this parameter in the SQL query. When you want to switch databases, just change the value of the parameter.

let
    Source = Sql.Database ("servername", ParameterName, [Query="SELECT * FROM tablename"])
in
    Source

 Related link: Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

aj1973
Community Champion
Community Champion

Hi @mlm 

You can use Query parameters

https://www.youtube.com/watch?v=OnaDJkGOmIE

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.