Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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
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?
I also faced the similar issue against Oracle Live connection. ANy solution ?
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
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.
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
@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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.