Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I'd like to set up a query that automatically extracts the most recent versions of these csv documents from the below webpages. The csvs change each week and I need the report to work with scheduled refresh.
I have previously set up a query to import a csv/xlxs using a dynamic date, but I wonder if there is a better way to do this? The NHS files in particular are tricky as other parts of the url string change randomly each week rather than just the date.
Can anyone advise if there is an easy way to achieve this? Thanks
https://digital.nhs.uk/data-and-information/publications/statistical/mi-potential-covid-19-symptoms-... (csv files are in the Resources section towards the bottom of the page)
Here's one way of approaching this
let
Source = Date.WeekOfYear(DateTime.FixedLocalNow()),
Weeks = {Source-30..Source},
#"Converted to Table" = Table.FromList(Weeks, Splitter.SplitByNothing(), {"Week"},null, ExtraValues.Error),
#"Added Custom" = Table.AddColumn(#"Converted to Table", "URL", each try Excel.Workbook(Web.Contents("https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/healthandsocialcare/causesofdeath/datasets/deathregistrationsandoccurrencesbylocalauthorityandhealthboard/2020/lahbtablesweek" & Text.From([Week]) & ".xlsx")) otherwise null)
in
#"Added Custom"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |