cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Temporary Tables in power bi

Hello,

 

I have an problem with power bi.How we can use temporary tables in power bi?

That means 

I wrote a query like this in power bi while connect the data.

 

select * into #abc from main table

 

select * into #abc1 from 

abc 

  inner join

main table2 

on abc.id=maintable2.id

 

while Iam writing this in power bi first table "abc" is loaded it did not shows any columns

just it shows number of rows effected.

it shows an error 'abc table does not exist' when we use the "abc" table.Is it right to achieve this?

or is there any way?Please suggest.

 

Thanks,

Chunduri

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

There are some error in your second query, when you reference the #abc table, you need to use #abc rather than abc. As both #abc and maintable2 have id column, you need to specify id column. You can modify the query like below: 

 

select * into #abc from Main1

select m2.* into #abc1 from #abc 
inner join Main2 m2
on #abc.id=m2.id
select *from #abc1

Before you run the query in Power BI, make sure the query works in SSMS firstly. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

There are some error in your second query, when you reference the #abc table, you need to use #abc rather than abc. As both #abc and maintable2 have id column, you need to specify id column. You can modify the query like below: 

 

select * into #abc from Main1

select m2.* into #abc1 from #abc 
inner join Main2 m2
on #abc.id=m2.id
select *from #abc1

Before you run the query in Power BI, make sure the query works in SSMS firstly. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi

May I know if it's possible to get temp table data? Cause I'm using very simple statement, and it not works.

2019-10-30 16_00_33-Microsoft Edge.png

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors