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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
narchans4u
Frequent Visitor

Call SP that returns multiple datasets from power BI (import mode - adv option - custom SQL)

Hi,

 

I want to import multiple data sets (tables) with some initial conditions.

for example - my SP returns 2 tables based on some condition:

 

create or alter proc sp_import_table
as
begin
select top 10 * from table1 where InsertDate > Dateadd(year,-1,getdate())
select * from table2 where active_id=1
end
go
exec sp_import_table

 

This above code executes in SQL client and throws results as 2 tables, while power BI returns only 1 data set (1st one)

How can I import both tables(or multiple tables) at one shot using SP (I am using SP to set filters at data source level). Is this possible?

1 ACCEPTED SOLUTION

Ok - thanks for your response.

View solution in original post

3 REPLIES 3
prateekraina
Memorable Member
Memorable Member

Hi @narchans4u,

 

Power BI will not ingest more than one table at once returned from a SP.

 

Use the filter queries inside your SP to fetch data inside Power BI.

Basically, you will have two separate queries for two tables.

 

Prateek Raina

 

 

HI, so there is no way to do this?

 

Do I have then to create individual SP? 

 

Thanks

Ok - thanks for your response.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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