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.
There is probably a simple answer but after looking all over for an answer and trying various methods, the right code still escapes me. The scenario is I have a stored procedure that uses two input parameters, a start and end date. If I hard code the date in the call, getting the data works fine. I defined two parameters in Power BI and have been trying to figure out how to call the SP with these 2 paramters. My paramters are named Sdatex and Edatex. Both are defined as date type variables.
here is my call that works:
DECLARE @return_value int
EXEC @return_value = [dbo].[Capacity_SP]
@SDate = '8/11/2016',
@EDate = '8/12/2016'
SELECT 'Return Value' = @return_value
I also tried to execute the SP code (a CTE) insted of the SP and I have the same issue. Hard coded dates work but I do not know how to tell Power BI that I want the paramters (Sdatex and Edarex) used instead of the date.
Any help would be appreciated.
Solved! Go to Solution.
Thank you so much. Will give this a go as soon as possible.
By the way, this work fine. Thanks so much. Now I need to find out how to update the parameters in PowerBI.com so that i can refresh the data as needed. Thanks again.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.