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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hrsingla88
Frequent Visitor

Can we add multiple sharepoint lists dynamically through some parameter and merge their data ?

Suppose we have multiple different SharePoint sites with same data schema and I want to query all of them dynamically based on say an initial query with the list of sites and merge the data. Is it possible ?

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Yes, turn your query into a function with the URL as parameter.

Then create a table with one column, containing the adresses in the rows. Then add a colum where you call your function and pass the reference to this column with the URL as a parameter.

You can then expand this new column and will have all your data in one table, with one additional column: The source where it came from (your URL).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

7 REPLIES 7
dhillon
Regular Visitor

Did you ever find a solution to schedule refresh ?

ImkeF
Community Champion
Community Champion

Yes, turn your query into a function with the URL as parameter.

Then create a table with one column, containing the adresses in the rows. Then add a colum where you call your function and pass the reference to this column with the URL as a parameter.

You can then expand this new column and will have all your data in one table, with one additional column: The source where it came from (your URL).

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

joris
Frequent Visitor

I can't seem to get this to work. I created a new column based off the URL (as a parameter: https://company.sharepoint.com/) and the customerID, but it doesn't give me the option to expand it

 

 

ImkeF
Community Champion
Community Champion

joris
Frequent Visitor

I missed the step where you turn the query into a function. I've tried this but no luck so far. 

 

So I start with connecting to my source URL via sharepoint list connector (eg https://company.sharepoint.com/sites/internal/)

 

and then I turn that table into a function? 

 

 

 

 

joris
Frequent Visitor

nevermind, I figured it out. 

 

This video was very helpful in explaining how to use the function in combination with a URL:
https://www.youtube.com/watch?v=Ar_fV_oXSNs

this ended up being the function: 

(Custom_Parameter as text)=>
let
Source = SharePoint.Tables("https://Company.sharepoint.com/sites/internal/"&Custom_Parameter,[ApiVersion = 15])
in
#"Source"

From thereon, I was able to create a new column using this function and combining it with the customerIDs.

Very slow performance though...

Anonymous
Not applicable

Hi all,

 

i managed to merge sp list . But i am unable to setup schedule refresh. 

Has anyone got same issue ?

 

Thank you 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.