Forum Discussion
Anonymous
6 years agoNot applicable
Shcedule refresh isn't working with parametr datasource
Do not works shceduled refresh with datasource parametr. how to fix it? Try to get powerbi rest api data. 0. func get api data getData let //Get or Post query to PowerBI API
source = (url...
lbendlin
Super User
6 years agoThis may help
https://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/
You will need to mask the initial query.
But that's the least of your problems. How do you acquire the Bearer token in the service?
lbendlin
Super User
6 years agoHere is one example of how to mask it
getgroups:
() =>
let
uriApi = "https://api.powerbi.com/v1.0/myorg/",
getDataApi = Json.Document(
Web.Contents(
uriApi,
[ RelativePath = "groups"
, Headers = [Authorization = token]
, ManualStatusHandling = {400}
]
)
)[value],
transformToTable = Table.FromList(
getDataApi,
Record.FieldValues,
Record.FieldNames(getDataApi{0})
)
in
transformToTablegetgroupusers:
(groupid as text) =>
let
uriApi = "https://api.powerbi.com/v1.0/myorg/",
getDataApi = Json.Document(
Web.Contents(
uriApi,
[ RelativePath = "groups/" & groupid & "/users"
, Headers = [Authorization = token]
, ManualStatusHandling = {400}
]
)
)[value],
transformToTable = Table.FromList(
getDataApi,
Record.FieldValues,
Record.FieldNames(getDataApi{0})
)
in
transformToTable
query to get group users:
let
// Returns a list of workspaces.
source = getgroups(),
// only lists premium workspaces
#"Filtered Rows" = Table.SelectRows(source, each ([isOnDedicatedCapacity] = true)),
// looks up users for each workspace
#"Invoked Custom Function" = Table.AddColumn(#"Filtered Rows", "Users", each getgroupusers([id]))
in
#"Invoked Custom Function"
This does not show the formula firewall warning.
- Anonymous6 years agoNot applicable
thx for answer. problem is not in formula firewall. i can get data in power bi desktop. it work's fine. I have a problem with schedule refresh in power bi service.
problem looks like:
db_name=Sql.Database(server,db,[Query ="..."]) AddColum=Sql.Database(server, [db_name]){[Name = "tableName"]}[Data] db1 Table db2 Table db3 Table db4 Table same problem if i get data by api