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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Can you pass a value to a Sql server stored procedure in Import mode?

Hi, I created a stored procedure to pass a value to it in direct query.
Works great when setting up the spen tested it in powerbi
     exec dfe_engagements2 @URL = 'www.Site/about'
in the stored procedure there is t-sql code to give me anything with the above site
     AND ReportURL like @URL + '%'

Trouble is when I run it, I get this error

MRUry7_0-1711047434310.png

How do I resolve this? I ran it in import mode but I don't see any information on passing values throughimport mode
And that error has been reported by many users.
Any ideas?

Thanks, Steven 

5 REPLIES 5
Anonymous
Not applicable

Yes, I just discovered that on my research about this 
It sounds amazing to me that this is an issue that's been going on for more than 5 years.  How could Microsoft not be working on resolving this issue, it's a huge one IMHO.

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41

Anonymous
Not applicable

Thanks but I've discovered that Stored Procedures that use CTE's that are used by PowerBI, fail.  It's a documented problem unfortunately,
Two choices.
1) Rewrite the code
2) Create a table valued function (which is a work around)

 

That's a well known limitation.  You may have wanted to mention that you use CTEs ...

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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