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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dor
Frequent Visitor

Stored Procedure parameters

Hello,
We are trying to create several Power BI reports and we're failing for several reasons. We're using DirectQuery and our data source is SQL Server stored procedure with 4 parameters (2 are datetime, one integer and varchar) and data returned don't have those fields, so we can't filter them. E.g. our datetime parameters are called StartDate and EndDate and columns returned are e.g. Customers Name and Customer Role and some other non-datetime columns (StartDate and EndDate are not returned). Our stored procedures are performing some complicated calculations with temp tables, so we can't just use simple select statements, so filtering and slicing is not our option.

I have read following discussion: https://community.powerbi.com/t5/Desktop/Parameter-User-Interface-for-Stored-Procedures/m-p/53009#M2... and since it has been few months since then, I have to post similar question.

 

Our problems are:
1. When connecting in desktop Power Bi with our stored procedure, our datetime parameters have to be "text" type, because all other options from the type dropdown (Date/Time, Date, Any) are producting following error:
"Invalid Argument. Unupported aggregation datatype for VertiPaq measure."
2. When in Power Bi Desktop, we can change parameter values and report gets refreshed. However, after publishing that report to PowerBI service (powerbi.com), we can't find a place to change parameters. Can stored procedure parameters be changed from the PowerBI service on powerbi.com? I'm not talking about filters (page level filters or report level filters), I'm talking about stored procedure parameters. If stored procedure parameters can't be changed from powerbi.com, do you guys plan to add this functionality any time soon?

 

Regards,
dor

1 ACCEPTED SOLUTION
v-haibl-msft
Employee
Employee

@dor

 

Have you tried with Import mode to see if get the same error without changing the datetime parameters to “text”? We’re not able to change parameters in Service now. You can vote the idea in following two similar ideas.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15323796-input-parameters-in-powe...

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-pa...

 

Best Regards,

Herbert

View solution in original post

2 REPLIES 2
Lexi147
Frequent Visitor

Hello, any one have the solution for this questiton of @dor 

v-haibl-msft
Employee
Employee

@dor

 

Have you tried with Import mode to see if get the same error without changing the datetime parameters to “text”? We’re not able to change parameters in Service now. You can vote the idea in following two similar ideas.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15323796-input-parameters-in-powe...

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-pa...

 

Best Regards,

Herbert

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors