Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Guys,
I will be uploading reports using service principal on Customer tenant.
And now I have switcher while using report internally within my Team - parameter to change Local Data Source (CSV files) or Cloud Data Source (Github).
Now when i will publish to customer i do not want to use both of them. I want to use CustomerDatabase for data.
What is the best practice in this case?
Should i create 2 datasets and modify power query adequantly? It would be more difficult to handle 2 datasets.
Or i need to include some kind of parameter and while embedding set up it to "Customer1" and within power query change data source?
But if this report would be refreshable on Customer Side? I will not have any GitHub or CSV gateways on customer side?
How you would solve the problem?
Best,
Jacek
Solved! Go to Solution.
Hi @jaryszek ,
As i suggested above, avoid relying on parameter switching at runtime.
Could you please let us know if you have any additional questions?
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
Hi @jaryszek ,
I hope this information provided is helpful. Feel free to reach out if you have any further questions or would like to discuss this in more detail. If responses provided answers your question, please accept it as a solution so other community members with similar problems can find a solution faster.
Thank you!!
Hi @jaryszek ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you!!
Hi @jaryszek ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @jaryszek ,
Thank you for reaching out to Microsoft Fabric Community.
As a best practice, avoid relying on parameter switching at runtime through embedding if the customer will be handling dataset refresh. This is because data source connections need to be clearly defined and stable ahead of time for scheduled refresh and gateway configuration to work correctly.
It is also recommended to avoid maintaining multiple source types within a single published version. Instead, include only the data source relevant to the target environment.
However, if you do need to support multiple data sources during development, you can consider the following approach.
let
Environment = Parameter_Environment,
Source = if Environment = "Team" then
Csv.Document(File.Contents("ExcelPath"))
else if Environment = "Customer" then
Sql.Database("CustomerDBServer", "CustomerDB")
else
error "Unsupported environment"
in
Source
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos", I’d truly appreciate it!
Thank you!!
Thank you,
few questions:
let
Environment = Parameter_Environment,
Source = if Environment = "Team" then
Csv.Document(File.Contents("ExcelPath"))
else if Environment = "Customer" then
Sql.Database("CustomerDBServer", "CustomerDB")
else
error "Unsupported environment"
in
Source
1.
Hi @jaryszek ,
As i suggested above, avoid relying on parameter switching at runtime.
Could you please let us know if you have any additional questions?
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
6 | |
2 | |
2 | |
2 |
User | Count |
---|---|
4 | |
4 | |
4 | |
4 | |
4 |