The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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]
Check
https://channel9.msdn.com/Blogs/MVP-Azure/Pass-parameter-to-SQL-Queries-statement-using-Power-BI
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
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
User | Count |
---|---|
62 | |
59 | |
54 | |
51 | |
33 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |