Forum Discussion
Advance Query - load data from the latest date to current date
- Anonymous2 years ago
Hi Falcon ,
lbendlin Thanks for your concern about this case!
For "startDateTime", to extract the Maximum Date from Your Table, you can use the following M code to create a new query:let Source = YourTableName, MaxDate = Table.Max(Source, "YourDateColumnName")[YourDateColumnName] in MaxDateFor the "endDateTime", you can directly use
DateTime.LocalNow()in your API request URL or format it as needed.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello lbendlin,
Sorry I am not familiar with the concept of self referencing semantic model. Can you explain further?
Thanks for all the help
in your Power Query code you can access a SSAS data source, via a DAX query. That includes the semantic model you are sitting in... So you can theoretically run a DAX query to ask for the max date in the semantic model, and then add all the data points after that date through your API.
It's brain freeze territory, so maybe having csv files with the extracts is easier.