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.

Parameters not Visible on DataSet Refresh in PBI Service

Hello,

 

I have a problem with Parameters on DataSet Refresh in PBI Service for the Custom Connector. I set the Parameters in PBI Desktop under 'Manage Parameters'.  

 

But When I give the static (HardCoded) values in CustomConnector, Refresh working perfectly in PBI Service.  

 

Note: In PBI Desktop, Refresh on CustomConnector works perfectly. Problem is only with PBI Service on 'Parameters'. 

 

Parameters-Power BI.png What could be the workaround for this issue?

 

Thanks in advance.

Status: New
Comments
v-yuta-msft
Community Support

@Anonymous ,

 

For example, suppose you have define a parameter named "Param1", have you used "Param1" in your queries? Please click advanced editor and check it.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hi @v-yuta-msft,  

 

Thanks for your reply. 

 

I have used the "SameName" as Parameter Name given in the Query Parameter. In PBI Desktop, input prompted for the My custom Connector as below,

 

CustomConnctorInput - Power BI Desktop.png

 

Here is my code: 

shared CubeConnector.Contents = (Host as text, Port as number, Cube as text, Ansicht as text, optional Sprache as text) =>
let
lang = if (Sprache <> null) then Sprache else "L02",
// Restapi Query to fetch TM1 Data
url = "http://"& Host &":"& Number.ToText(Port) &"/api/v1/",
body = "{

}",

Source = Json.Document(Web.Contents(url, [Headers=[#"Content-Type"="application/json"], Content = Text.ToBinary(body), RelativePath = "Cubes('"& Cube &"')/Views('"& Ansicht &"')/tm1.Execute?$expand=Axes($expand=Hierarchies($select=Name),Tuples($expand=Members($select=Attributes/"&lang&"))),Cells($select=Value)"

])),

 

In PBI  Desktop,

 

Parameter.png

 

Anything else should I change?