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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
LSeitz
Regular Visitor

Referencing another query in a SQL Query

Hello,

 

I'm in the process of migrating from SAS to power bi. In Power Query when adding a new source, are you able to reference other queries that have been already loaded?

i.e.

Table A is an excel table

Table B is a database in iSeries

Table C combination of Table A and Table B

In SAS, Table C uses Table B as the main table and cross joins to Table A. 

 

When writing a SQL code to bring in Table B, can you reference already pulled in queries in the SQL or would that have to be done after pulling the data from both Table A and B and manually creating Table C in power query. 

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @LSeitz ,

 You can't directly reference other queries imported into Power BI when importing a query. As you say, in this scenario you would need to use Power Query to create Table C. 

View solution in original post

1 REPLY 1
djurecicK2
Super User
Super User

Hi @LSeitz ,

 You can't directly reference other queries imported into Power BI when importing a query. As you say, in this scenario you would need to use Power Query to create Table C. 

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.