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
adelm
Frequent Visitor

Parameter in query

Hi

 

I am using Power BI to pull data from SQL Server, I would like to use parameters to change the company name in the query .

Below is an example for a simple query, my wish is to replace the XXX value with my list of paramters (Company number for instance).

Today I am creating seperate queries then merging all the data into one table, I would like to save hours of work by using a list of companies as parameters.

 

Thank you for your help

 

SELECT [Document Type]
      ,[No_]
      ,[Quote No_]
      ,[Sell-to Customer No_]
      ,[Shortcut Dimension 1 Code]
      ,[Shortcut Dimension 2 Code]
      ,[Salesperson Code]
      ,[Status]
      ,[Responsibility Center]
      ,[Quote Status]
      ,[Job No_]
      ,[Job Description]
      ,[Job Line Task No_]
      ,[Schedule Code]
      ,[Progress Code]
      ,[Job Task No_]
  FROM [NAV].[dbo].[XXX$Sales Header]

 

 

2 REPLIES 2

Thank you for your answer, this is not what I am looing for, with your solution I need to switch between each parameter manually.

What I am looking for is more like a loop into company names listed in param list to refresh the data

 

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.