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
Anonymous
Not applicable

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

6 REPLIES 6
LangeHolm
Regular Visitor

I'm experiencing the same thing. 
I have tried setting up the incremental refresh, and succeded. But I can't edit the RangeStart and RangeEnd on the Power BI Service. 

Any help? 

sahurajkumar
New Member

I also faced the similar issue against Oracle Live connection. ANy solution ?

v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

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
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

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

Hi @Anonymous ,

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
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

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