Forum Discussion
Concept
1 year agoNew Member
Populating ODATA query from a data table
Hi Everyone, I have an ODATA feed which pulls data back to PowerBI and is functioning. It has been created using a blank query, where the number highlighted in blue is the data point referenc...
smpa01
1 year agoCommunity Champion
Concept yes, it is doable in theory but performance will take a huge hit and it is not scalable.
Pseudocode
// write a function get_data with table_num parameter
// pseudocode
(table_num as integer)=>
let
Source = OData.Feed("https://odata.c3ntinel.com/v0.1/", null, [Implementation="2.0"]),
SelectFunction = Source{[Name="GetCustomDatesMeterReadings",Signature="function (meterId as number, resolution as text, start_date as datetimezone, end_date as datetimezone) as nullable record"]}[Data],
GetCustomDatesMeterReadings = SelectFunction(table_num, "Month", #datetimezone(2022, 1, 1, 0, 0, 0, 0, 0), #datetimezone(2025, 01, 31, 0, 0, 0, 0, 0)),
Readings = GetCustomDatesMeterReadings[Readings]
in
Readings
//table_num list
table_num = [1,2,3,....n]
//forEach in table_num invoke get_data
List.Geneerate() - POWER Query For loop
Better alternative (if you have fabric), use notebook to perform this task.