Forum Discussion

LSeitz's avatar
LSeitz
Frequent Visitor
1 year ago
Solved

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. 

  • 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. 

1 Reply

  • 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.