cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft
Microsoft

@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
Microsoft
Microsoft

@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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors