cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jojop1972 Member
Member

Editing parameters in Power BI service

Hello

 

I have a pbix file which uses parameters and passes the parameters through to a SQL query to pull off transactional data between 2 date periods.  The queries are in direct query mode and all works well in Power BI desktop.

 

However, when I publish the pbix file to the Power BI service and go to the dataset and select parameters  I receive an error message stating that 'Parameters haven't been defined for this dataset yet.  If you want to set parameters, use the Query editor', but I have defined the parameters!

 

Does anyone have any ideas, ideally I would like to have the facility to change the parameters in the service so that users can change them rather than me changing at pbix level and then having to republish.

 

Many thanks in advance

Jo

4 REPLIES 4
Community Support Team
Community Support Team

Re: Editing parameters in Power BI service

Hi @jojop1972 ,

AFAIK, if you want to use query parameters on power bi service side. You need to define them as accurate types and invoked in your query tables.(e.g. 'any', 'binary' not able use on power bi services side)
Can you please explain more about your configuration and settings?

How to Get Your Question Answered Quickly

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
jojop1972 Member
Member

Re: Editing parameters in Power BI service

Hi @v-shex-msft 

 

Thanks for your reply.  The parameters are set to text and are used to pass dates through an SQL query.  The set up is as per attached image.  The SQL query is nested within M query for the table:

 

let

StartDate = StartDate,
EndDate = EndDate,

Source = Sql.Database("xxxxx\data", "transactional",
[Query = "SELECT * from AVGdayrate A

where (A.Date > '" &StartDate& "' AND a.date < '" &EndDate& "')",


CommandTimeout=#duration(0, 0, 10, 0), HierarchicalNavigation=true, MultiSubnetFailover=true])
in
Source

 

The query is in direct query mode as the datasource is very large and cannot be used in import mode

 

I have also enabled load on the Parameters within Power Query - is this what you mean by invoking parameters?

 

Thanks again for your help

 

Jo.

 

 

 

parameters.PNG

Community Support Team
Community Support Team

Re: Editing parameters in Power BI service

Hi @jojop1972 ,

I found you are using same steps name to receive parameters, it may cause the conflict when power bi use parameters.
I'd like to suggest you use other name to define receive parameters or direct use it in t-sql query.

 

let
Source = Sql.Database("xxxxx\data", "transactional",
[Query = "SELECT * from AVGdayrate A

where (A.Date > '" &StartDate& "' AND a.date < '" &EndDate& "')",

CommandTimeout=#duration(0, 0, 10, 0), HierarchicalNavigation=true, MultiSubnetFailover=true])
in
Source

Regards,

 

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
jojop1972 Member
Member

Re: Editing parameters in Power BI service

@v-shex-msft  I've tried your suggestion but I'm still getting the same error message.  Do you have any further suggestions?

 

Thanks

 

Jo.

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,528)