Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Rebecca6634
Frequent Visitor

Importación de un csv con URL dinámica desde una página web

Hola

Me gustaría configurar una consulta que extraiga automáticamente las versiones más recientes de estos documentos csv de las páginas web siguientes. Los csv cambian cada semana y necesito que el informe funcione con la actualización programada.

He configurado previamente una consulta para importar un csv/xlxs usando una fecha dinámica, pero me pregunto si hay una mejor manera de hacer esto? Los archivos NHS en particular son complicados ya que otras partes de la cadena url cambian al azar cada semana en lugar de sólo la fecha.

¿Puede alguien aconsejar si hay una manera fácil de lograr esto? Gracias

https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/causesofdeath/datasets/death...

https://digital.nhs.uk/data-and-information/publications/statistical/mi-potential-covid-19-symptoms-... (los archivos CSV se encuentran en la sección Recursos hacia la parte inferior de la página)

1 REPLY 1
lbendlin
Super User
Super User

Aquí hay una manera de abordar este

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"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.