Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I wanted to pass the dynamic date to a EndDate Parameter in Power Bi, can someone please help me how do it.
Thank you in advance.
Pthapa
For some reason complex quries or stored procedure doen't run on direct query mode.
It always gives following error;
Try this: (How to use SQL Server stored procedures in Microsoft PowerBI? - Stack Overflow)
SELECT *
FROM OPENQUERY ([server name],
'EXEC dbname.dbo.spname @parametername = ''R1''');
Hi,
I am using stored procedure from sql server in Import Mode that has Start and End Date as paramters. It doesn't allow me to bind the column to the parameter in Import Mode, as far as the Microsoft doc says. Also, when I swithced to Direct query, it loads the data however when I close and apply; throws some error. No matter it alwasy shows this error in Direct mode.
So, I am still stuck, there has to be a way Power Bi can run the data based on the conditions I have.
Thanks
Having an SP is not ideal but should work. Maybe you are hitting one of the other limitations
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Does the SP work in a standard direct query?
Bind the column to the parameter.
Hi Ben,
The sp runs without issues on standard mode (Import mode). I don't see it is part of any limitations that is explained in above link. As I have mentioned the dataset doen't contain the start and end date as available fields to bring them to the power bi slicer. My goal is to have user able to choose the startDate and EndDate in Power Bi to retrieve the data in the visual. This is the stored procedure created for SSRS reports where user has the parameter (startDate and EndDate) for them to select. I want to have same interface for user in power bi visual. Binding parameter is not available in my case.
Thanks,
The sp runs without issues on standard mode (Import mode)
Does it work in Direct Query mode?