Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
sangwonseo
Frequent Visitor

Parameters haven't been defined for this dataset yet.

Anyone has same issue? I want to create template app and publish it.

 

Here's my scenario. I created pbix file from power bi desktop. I definitely added parameters by using Query Editor, and save as pbix file. And then I created workspace from power bi service and tried to create contents by uploading pbix file. However, I can't type values for parameters.

 

screencapture-app-powerbi-groups-me-settings-datasets-2020-01-31-17_28_58 (1).png

6 REPLIES 6
sangwonseo
Frequent Visitor

= Python.Execute("import requests#(lf)import csv#(lf)import json#(lf)import pandas as pd#(lf)#(lf)response = requests.post(#(lf) 'https://data.thinknum.com/connections/dataset/" & dataset_id & "/query/new',#(lf) headers={#(lf) ""Authorization"": ""token " & token & """,#(lf) ""X-API-Version"": ""20151130"",#(lf) ""Accept"": ""application/json""#(lf) },#(lf) data={#(lf) ""request"": json.dumps({#(lf) ""tickers"": [],#(lf) ""filters"": []#(lf) }),#(lf) ""start"": " & start & ",#(lf) ""limit"": " & limit & "#(lf) }#(lf))#(lf)result = json.loads(response.text)#(lf)columns = [""{}({})"".format(item['display_name'], item['id']) for item in result['items']['fields']]#(lf)rows = result['items']['rows']#(lf)df = pd.DataFrame(rows, columns=columns)#(lf)print df")

I actually used python script and parameters seems not working from python script. Any ideas?

Hi @sangwonseo ,

 

Sorry for our late reply, we are not good at python script, Could you please try to save the query out side the function and execute as following?

 

let
  script = ........... ,
  Source = Python.Execute(script)
in
  Source

 

We suggest you to delete the query if it contain any confidential information.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @sangwonseo ,

 

If you are using the parameter in the Web.Contents function, such as following:

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/" & id &"/datasets/" & [datasetid] & "/refreshes",[Headers=[Authorization="Bearer " & TokenParameter]]))
in
    Source

 

Try to use the Relative Path parameter to included all the dynamic part of the url, such as following

 

let
    Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/",[RelativePath=id &"/datasets/" & [datasetid] & "/refreshes",Headers=[Authorization="Bearer " & TokenParameter]]))
in
    Source

 


Best regards,

 

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

Thanks for reply. But I am using Python script and it seems not working.

Hi @sangwonseo ,

 

How about the result after you follow the suggestions mentioned in my original post?Have you tried to use the Web.Contents to call the api that you called in your python script?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
GilbertQ
Super User
Super User

Hi there

For your parameters what are the data types set to?

If they are set to ANY they will not be available in the Power BI Service.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors