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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
sebasjuniper1
Regular Visitor

Create a new query from other table

Hello

 

I need to launch a query to another database with the data obtained in another table.

 

Example:

 

1) Fill with SQL the Data Table

2) Create a new Table with column customer

 

2019-12-07_09h50_52.png

 

Now I neeed to create a SQL query to another database and server with Customer in (COLUMN) the only idea the only idea I can think of is to pass it to ',' join. And then pass it as a parameter in an SQL IN

'9556','288'

 

Is there any other way?

 

Can you help me make a ',' and pass it by parameter?

 

I can't do a merge query since there is a lot of data

 

Thanks

1 ACCEPTED SOLUTION
6 REPLIES 6
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @sebasjuniper1,

 

I would recommend Power Query.

I think, if the Power Query Query Folding is not able to combine the data on Source Layer, there will be no better way.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi @mwegener 

 

Thanks for you reply

 

I don't understand why you tell me to use power query. What do you mean?

 

Thanks

 

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @sebasjuniper1 ,

 

In my opinion, it is better to use rudimentary power queries than to generate technically complex SQL queries.

But you have found your solution. I wish you success. 🙂

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi! @mwegener 

 

Can you explain the better solution or a web when i can learn. 

 

I'm very interested to use "correctly" the power bi

 

Thanks

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @sebasjuniper1 ,

 

If you want to merge data from two data sources, create one query per data source and merge them using the dialog box.

https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data#combine-queries

 

Power Query should determine how the data could merge most efficiently and if necessary send filter values to the source.

 

https://docs.microsoft.com/en-us/power-bi/guidance/power-query-folding

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.