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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AaronToth
Resolver I
Resolver I

Parameterize PBI dataset to use different ADLS accounts per Power BI environment/workspace

Hi all,

 

I am looking at parameterizing the PBI dataset to enable deployments from environment to environment (using PBI pipelines), so that I can select the ADLS (storage account) under the "Parameters" section of the dataset for the applicable environment.

 

I have got a good start, but I am still getting no results back, and some hard to understand errors upon refreshing the dataset.  

AaronToth_0-1690313732609.png


1. I have created a parameter for ADLS in the dataset.  There are 3 entries that have been set (DEV, UAT, PROD)
2. I have created a paramter for "FolderPath" in the dataset.  There are 3 entries that have been set (DEV, UAT, PROD)

If I rename the container in UAT incorrectly, I get an error that says it can't find the container. 
<snip>
 Status code: 404, description: 'The specified container does not exist.'..
</snip>

This means to me that in UAT, PBI is looking at the ADLS account in UAT.  If I rename it correctly (matching the dataset), the error changes - meaning it found the container

 

After I rename and fix the container issue, I see the following error ->
<snip>
</ccon>;The key didn't match any rows in the table.. The exception was raised by the IDbCommand interface. Table: 

</snip>

 

It actually lists the UAT storage in the error too, so it is looking at UAT.  Both storage accounts have the same container name and only have 2 csv files.  I'm not sure what it is, but I believe I'm missing another paramerter or configuration change.

1 ACCEPTED SOLUTION
AaronToth
Resolver I
Resolver I

Hi all,

 

I was able to get this working after some further troubleshooting.  Here are the broken and working steps.

#InError
I was adding the parameter(s) to the step via

Query Editor - Advanced Editor - Manually change the code (replace "string" with param_name)

#working
I removed my manual Mcode updates and used the "cog" on the right for the "source" step.  I clicked the "parameter" option and selected the ADLS param I created.

Everything now works on a per environment basis.  DEV looks at DEV ADLS, UAT looks at UAT ADLS via the setting of a parameter in the PBI workspace (dataset -> parameters)


Thanks!
Aaron

View solution in original post

1 REPLY 1
AaronToth
Resolver I
Resolver I

Hi all,

 

I was able to get this working after some further troubleshooting.  Here are the broken and working steps.

#InError
I was adding the parameter(s) to the step via

Query Editor - Advanced Editor - Manually change the code (replace "string" with param_name)

#working
I removed my manual Mcode updates and used the "cog" on the right for the "source" step.  I clicked the "parameter" option and selected the ADLS param I created.

Everything now works on a per environment basis.  DEV looks at DEV ADLS, UAT looks at UAT ADLS via the setting of a parameter in the PBI workspace (dataset -> parameters)


Thanks!
Aaron

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.