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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors