Forum Discussion

dmbd1904's avatar
dmbd1904
Helper III
5 years ago
Solved

This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed

Hi, my solution works great in Power BI desktop but I'm having an issue in the service. Can anybody help?

 

 

 

 

(VarURL as text)=>
let
Source = Json.Document(Web.Contents(VarURL)),
#"Converted to table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to table", "Column1", {"fld_uid", "fld_nodeid", "fld_id", "fld_date_raised", "fld_originator", "fld_organisation", "fld_type", "fld_zone", "fld_level", "fld_apt_number", "fld_area", "fld_description", "fld_assigned_to_org", "fld_assigned_to", "fld_target_date", "fld_date_closed", "fld_timestamp", "fld_deletetime"}, {"fld_uid", "fld_nodeid", "fld_id", "fld_date_raised", "fld_originator", "fld_organisation", "fld_type", "fld_zone", "fld_level", "fld_apt_number", "fld_area", "fld_description", "fld_assigned_to_org", "fld_assigned_to", "fld_target_date", "fld_date_closed", "fld_timestamp", "fld_deletetime"}),
#"Renamed columns" = Table.RenameColumns(#"Expanded Column1", {{"fld_zone", "Location 1"}, {"fld_level", "Location 2"}, {"fld_area", "Location 3"}, {"fld_apt_number", "Unit"}})
in
#"Renamed columns"

 

 

let
Source = #"Inspections Json URLs",
#"Invoked Custom Function" = Table.AddColumn(Source, "Json", each #"Inspections Function"([Json URL])),
#"Expanded Json" = Table.ExpandTableColumn(#"Invoked Custom Function", "Json", {"fld_uid", "fld_nodeid", "fld_id", "fld_date_raised", "fld_originator", "fld_organisation", "fld_type", "Location 1", "Location 2", "Unit", "Location 3", "fld_description", "fld_assigned_to_org", "fld_assigned_to", "fld_target_date", "fld_date_closed", "fld_timestamp", "fld_deletetime"}, {"fld_uid", "fld_nodeid", "fld_id", "fld_date_raised", "fld_originator", "fld_organisation", "fld_type", "Location 1", "Location 2", "Unit", "Location 3", "fld_description", "fld_assigned_to_org", "fld_assigned_to", "fld_target_date", "fld_date_closed", "fld_timestamp", "fld_deletetime"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Json",{"Json URL"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Columns",{{"fld_date_raised", type datetime}, {"fld_target_date", type datetime}, {"fld_date_closed", type datetime}, {"fld_timestamp", type datetime}, {"fld_deletetime", type datetime}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"fld_date_raised", type date}, {"fld_target_date", type date}, {"fld_date_closed", type date}, {"fld_deletetime", type date}})
in
#"Changed Type1"

7 Replies