Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

PowerQuery M How to iterate over the values in a list.

Hi,
I have a list of URLs that link to some csv files. I want to open all of these using Csv.Document and Web.Contents

The problem i am having i am trying convert my list of urls into a list of tables via list.transform;  so that i can both csv.document and web.contents functions to each  value in my list of urls which would then open them as tables thus hopefully generating a list of tables.  Does anyone know how i can do this?, i can't figure out how to refer to each value in the list so i am pretty stuck.

  • Hi Anonymous 

    It seems you have many urls which point to different csv files.

    To connect to these csv files, you need to enter each URL in Web connector inside Power BI Desktop.

    This means you need to perform many times.

    then you will get many lists when opening Edit queries, you can transform the list to table.

     

    There are other ways to connect to mutiple csv files:

    1. Put all the CSV files in a local folder, then connect to the local folder using Folder connection in Power BI Desktop, you can combine all the data of the CSV files in a single table, and create report in Power BI Desktop. Then you can publish the report to Power BI Service, and set schedule refresh with gateway, this way, once you have any data changes in csv files, Power BI report will get updated based on refresh schedule.

    2. Put all the CSV files in OneDrive for bussiness folder, then connect to the folder by entering the following URL in SharePoint Folder connector of Power BI Desktop. You can combine all the data of the CSV files in a single table, and create report in Power BI Desktop. Then you can upload the report to Power BI Service, and set schedule refresh without gateway.

    https://mydomain-my.sharepoint.com/personal/user_mydomain_com

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    It seems you have many urls which point to different csv files.

    To connect to these csv files, you need to enter each URL in Web connector inside Power BI Desktop.

    This means you need to perform many times.

    then you will get many lists when opening Edit queries, you can transform the list to table.

     

    There are other ways to connect to mutiple csv files:

    1. Put all the CSV files in a local folder, then connect to the local folder using Folder connection in Power BI Desktop, you can combine all the data of the CSV files in a single table, and create report in Power BI Desktop. Then you can publish the report to Power BI Service, and set schedule refresh with gateway, this way, once you have any data changes in csv files, Power BI report will get updated based on refresh schedule.

    2. Put all the CSV files in OneDrive for bussiness folder, then connect to the folder by entering the following URL in SharePoint Folder connector of Power BI Desktop. You can combine all the data of the CSV files in a single table, and create report in Power BI Desktop. Then you can upload the report to Power BI Service, and set schedule refresh without gateway.

    https://mydomain-my.sharepoint.com/personal/user_mydomain_com

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    Is this problem sloved? 

    If it is sloved, could you kindly accept it as a solution to close this case?

    If not, please let me know.

     

    Best Regards

    Maggie