cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dor Frequent Visitor
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

Accepted Solutions
v-haibl-msft Super Contributor
Super Contributor

Re: Stored Procedure parameters

@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

1 REPLY 1
v-haibl-msft Super Contributor
Super Contributor

Re: Stored Procedure parameters

@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
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 94 members 1,634 guests
Please welcome our newest community members: