Forum Discussion

Annur2001's avatar
Annur2001
Regular Visitor
8 years ago
Solved

Import data from web with changing the sources

Hi,

 

I want to import data from Wikipedia regarding the name of a province that each of it has suburbs or villages name. There are 34 provinces that I need to import and each province will have more than 15 suburb or villages, depend on the provinces.

 

I have the name of all provinces but I need to put suburbs or villages in each province. The source is, for example as below

 

https://id.wikipedia.org/wiki/Daftar_kabupaten_dan_kota_di_Jawa_Tengah

 

The red text is an example of the province name. If I change the province name directly in the website to, as an example, "Kalimantan_Barat", the website will show the suburbs or villages name in that province. I want to import that data by changing the province name only instead of import one by one and append the 34 details of provinces in one file. I look forward to your advice. 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Annur2001,

    You can. But the table structure in the two webpages are different(for example, some column name contain space), when you expand the custom column, you will find the data are not combined properly.

    Thus I provide you another method, by choosing different parameters in the dropdown, then you can get different tables of different webpages, and you can append them later. Please download modified PBIX file to check details.

    Regards,
    Lydia

4 Replies

    • Annur2001's avatar
      Annur2001
      Regular Visitor

      Anonymous

       

      Could you please explain about creating parameters in detail? 

      What I mean in my question previously was whether possible to create like a table of province name then when I want to call the data of province that I need, I just type in or choose in the table instead of using edit queries tab and paste the new sources from a website. So, is it possible to do the same thing as getting the data from the website by changing the year tabs? as on youtube link below

       

      https://www.youtube.com/watch?v=6PZSZ53iSos&t=395s

      • Anonymous's avatar
        Anonymous
        Not applicable

        Annur2001,

        You can. But the table structure in the two webpages are different(for example, some column name contain space), when you expand the custom column, you will find the data are not combined properly.

        Thus I provide you another method, by choosing different parameters in the dropdown, then you can get different tables of different webpages, and you can append them later. Please download modified PBIX file to check details.

        Regards,
        Lydia