Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
When connecting the report to a SharePoint list, I provided the URL to the site, giving me a list of SharePoint lists to choose from.
The Advanced editor code looks like below:
Source = SharePoint.Tables(list_source, [Implementation="2.0", ViewMode="Default"]),
#"some-long-code-possibly-identifier" = Source{[Id="some-long-code-possibly-identifier"]}[Items]
list_source is a parameter containing the URL to the site.
I want the report to point to another list on the same site. How can I parameterize the list name such that I can point the report to different lists quickly?
For now, I created a new connection to load the data from the new list and went to the Advanced Editor and got the ID of this list, and replace the old one with this. Surely, there must be a more graceful way to do this.
Thank you for the answer @TomMartens Instead of parameterizing the List ID, is there a way I can refer to the List by name or provide it as part of the URL? The ID is an 8digit-4igit-4digit-4digit-12digit alphanumeric code. If I parameterize the ID, I still have to find out the ID for the list each time.
The only way I am able to find that ID is to connect to a list and get the ID from the Advanced Editor. Is there a straightforward way to get the List ID?
Hey @GopVan ,
not that I know, as the List connector does not support a name property.
You can use Sharepoint to find the ID of the list, I assume that this is more simple than using Power Query .
Regards,
Tom
Hey @GopVan ,
you can create parameters that store the identifiers Parameters - Power Query | Microsoft Learn
Create another paramater like pThisOrThat.
Then you can change the relevant queries like so
let
ListParameter = if pThisOrThat = "this" then pList1 ... ,
Source = ... ,
theList = ... ListParameter ... ,
//from here you have to reference theList
finalTransform = AnyTransform( theList , ...)
in
finalTransform
Hopefully, this provides what you are looking for.
Regards,
Tom
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 131 | |
| 99 | |
| 56 | |
| 37 | |
| 37 |