Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I need to use parameters in my queries, I have 2: One to choose between "TEST" and "PROD" and one to select a number.
Both parameters are type text, and are a list of values, and required. I have also tried with type decimal and any value for the number parameter, but no matter what I do the Power Bi Services doesn't see the parametes.
It says
Parameters haven't been defined for this dataset yet. If you want to set parameters, use the Query Editor.
I know for certain I am looking at the correct dataset, and I have tried deleting the dataset and reuploading to make sure it's a "fresh" upload. I have also tried uploading it to other workspaces but none see the parameters. Parameters are enabled load.
Why does Services not see my parameters?
Solved! Go to Solution.
Final solution :
When your parameters are not detected , then recreate your powerbi desktop file by exporting / importing a template file
By the way, note that IT IS possible to have the datasource as a parameter.
You should only take care to use the parameter "as is", without any calculation.
Hope it helps,
Gregoire
Hy,
I have the same problem, the parameters are not recognized in Powe BI Services.
The parameters are enabled for loading and I tried to recreate the file with an export / import to a PBIT model and load this pbi into the workspaces, but we still don't see the parameters.
Hi,
Have you created and selected a gateway for the dataset? I think it might have been related to that in my case.
What are these parameters for ? how are they used in our source code ? Is it linked to the url of the data source ?
Please send the code (Query-M) of the parameter + the code which is using this parameter.
Hi there, Same issue here and let me paste the M query here:
Query:
let
Source = Sql.Database("xyz.database.windows.net", "database"),
#"Filtered Rows" = Table.SelectRows(Source, each [Item] = #"Data Table"),
table = #"Filtered Rows"{[Schema="countryschema",Item=#"Data Table"]}[Data]
in
table
Parameter:
"abc" meta [IsParameterQuery=true, List={"abc", "def"}, DefaultValue=..., Type="Any", IsParameterQueryRequired=true]
I use Azure SQL DW connector direct query mode if that helps.
Ray
Hi @Anonymous,
I am experiencing the same issue - Power BI service not detecting my parameters from the PBIX. I have only 1 parameter of type text which is Environment (values Dev, Test, Prod).
I tried exporting as template, and importing again, and I have tried both Publish and using SharePoint online for sync.
How did it resolve for you?
Best Regards,
Simen
You can not have a datasource string (eg Sharepoint URL) which depends on an other parameter.
The Sharepoint url must be either hard-coded in your source code, either in a parameter.
Why ? As soon as you perform any calculation on the string, Power BI service can not know anymore which is the data source.
And power BI requires to know the datasource, for many reasons.
=> Replace your parameter DEV/TEST/PROD by one parameter SharepointURL and it will solve your issue.
Then, if it doesn't work immediately, try to recreate the file with an export/import to a PBIT template.
Best regards,
Grégoire
Hi @Anonymous
You may find it in Settings->Datasets.For further,you may have a look at this article.
Regards,
Cherie
Hi Cherie
I have read the article and microsofts own article about parameters. However, that's exactly the problem. Neither of my parameters are visible in settings > datasets.
https://docs.microsoft.com/en-us/power-bi/service-parameters
I do look at the correct dataset, and I know it's the updated version of the dataset. Parameters aren't showing in Power BI Services
Hi @Anonymous
Please make sure you've used the parameter for your table in desktop.Then it will be visible in settings > datasets.
Regards,
Cherie
Hi Cherie
I use both parameters directly to get the source data, they are used to modify a URL link and a Sharepoint folder.
Could this issue be related to Sharepoint not allowing a scheduled refresh?
Hi @Anonymous
It cannot be refreshed when the data source is a parameter of the function.For further,please vote for this idea.
Regards,
Cherie
Final solution :
When your parameters are not detected , then recreate your powerbi desktop file by exporting / importing a template file
By the way, note that IT IS possible to have the datasource as a parameter.
You should only take care to use the parameter "as is", without any calculation.
Hope it helps,
Gregoire
I tried exporting and importing with pbit...what exactly is that supposed to do for you? When I open it it asks for parm values and then opens. I tried re-publishing to workspace and no change. Not sure why that would impact parms showing in dataset anyways. I've got this to work for single query in dataset before but when I attempt with multiple tables it doesn't work. Curious if all tables have to have parameters applied to filter as I'm only doing some of them.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.