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
jsjohnson5688
Frequent Visitor

Using parameters in Power BI service to execute stored procedure via direct query

Hi,

been working through a couple of solutions in order to compare output of two datasets dynamically.  In general, I have two deals tables - each are the same exact table structure with the only difference being the snapshot date that each data was taken as of.  

the first way I've attempted to solve is by using DAX.  Problem I've had with this is that scalar output measures and table output measures don't play nice together so I can't write a measure with selectedvalue(snapshotdate1) and generate a list, and then determine if any of the table values are found in a table output generated from selectedvalue(snapshot date2). 

second way I can do this is with a parameterized stored procedure that takes input from power Bi for the beginning snapshot date and ending snapshot date and runs through procedure logic the way I need it to.  Problem here is getting the input from somewhere in power Bi service back to stored procedure parameters and then rendering output to power Bi.  

Any thoughts or has anyone tried something similar before?

1 REPLY 1
GilbertQ
Super User
Super User

Hi there

As far as I know there is no way to run a stored proc with dynamic values via Power BI.

You could have a DirectQuery to a table, which then based on the filters selected will then send the corresponding data to the underlying source.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.

Top Solution Authors
Top Kudoed Authors