Forum Discussion
Paul_keijzers
5 years agoFrequent Visitor
Issue with refreshing dataset in Powerbi
I got a issue with my code when i use this code: let
url= "https://tenant.yoobi.nl/api/v1/",
relpath="reportDirectGet/TABLEAU",
quer=
[
periodFromDate="01-06-2021",
...
- 5 years ago
In the end this is the code which is working:
let quer= "?periodFromDate=" & startdate & "&periodToDate="& enddate, options=[Headers =[#"Authorization"= "Basic key=="]], Source = Json.Document(Web.Contents("https://tenant.yoobi.nl/api/v1/reportDirectGet/TABLEAU" & quer,options)), jsondata = Source[jsondata], #"Converted to Table" = Table.FromList(jsondata, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "reports"}}), #"Expanded reports" = Table.ExpandRecordColumn(#"Renamed Columns", "reports", {"lastname", "infix", "initials", "firstname", "gender", "bsn", "title", "departmentname", "departmentcode", "email", "username", "dateofbirth", "employeenumber", "employeestate", "dateregistration", "dateretirement", "dateemployed", "jobname", "jirauser", "gmail", "employeeabbr", "contractnr", "fte", "contracttype", "contractdatestart", "contractdateend", "datum", "uur", "opmerkingen", "soortuur", "bijgewerkt_tot", "acc_datum", "projectmanager", "projectname", "startdate", "enddate", "code", "projectstate", "projectextrastate", "projectclassification", "projectdescription", "activityname", "startdateactivity", "enddateactivity", "activitystate", "ledgeraccount", "isbillable", "customercode", "declarationtypeactivitylist", "declarationtypeprojectlist", "projectbudgettype", "projectbudget", "activitybudget", "projectkeywords", "activitykeywords"}, {"lastname", "infix", "initials", "firstname", "gender", "bsn", "title", "departmentname", "departmentcode", "email", "username", "dateofbirth", "employeenumber", "employeestate", "dateregistration", "dateretirement", "dateemployed", "jobname", "jirauser", "gmail", "employeeabbr", "contractnr", "fte", "contracttype", "contractdatestart", "contractdateend", "datum", "uur", "opmerkingen", "soortuur", "bijgewerkt_tot", "acc_datum", "projectmanager", "projectname", "startdate", "enddate", "code", "projectstate", "projectextrastate", "projectclassification", "projectdescription", "activityname", "startdateactivity", "enddateactivity", "activitystate", "ledgeraccount", "isbillable", "customercode", "declarationtypeactivitylist", "declarationtypeprojectlist", "projectbudgettype", "projectbudget", "activitybudget", "projectkeywords", "activitykeywords"}), #"Changed Type with Locale" = Table.TransformColumnTypes(#"Expanded reports", {{"datum", type date}}, "nl-NL"), #"Removed Columns" = Table.RemoveColumns(#"Changed Type with Locale",{"initials", "gender", "bsn", "title", "departmentname", "departmentcode", "dateofbirth", "employeenumber", "employeestate", "dateregistration", "dateretirement", "dateemployed", "jobname", "jirauser", "gmail", "employeeabbr", "contractnr", "fte", "contracttype", "contractdatestart", "contractdateend", "soortuur", "bijgewerkt_tot", "acc_datum", "projectmanager", "startdate", "enddate", "projectclassification", "projectdescription", "startdateactivity", "enddateactivity", "activitystate", "ledgeraccount", "isbillable", "customercode", "declarationtypeactivitylist", "declarationtypeprojectlist", "projectbudgettype", "activitybudget", "projectkeywords", "activitykeywords"}) in #"Removed Columns"
arvindsingh802
5 years agoCommunity Champion
Have you tried to use solution suggested in
Setting a scheduled refresh on a Dynamic Data Source in Power BI | by dataninja | DataDrivenInvestor
Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD
If this post helps, then please consider Accept it as the solution and give it a thumbs up
Paul_keijzers
5 years agoFrequent Visitor
The first item is almost the same as mine change mine to have a full relative path but it did not have any effect . The second one is more on SQL which is a bit different using a gateway which i am not using