Forum Discussion
jaryszek
Super User
1 year ago2 datasets or parameters to upload report within customer tenant?
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 (C...
- 1 year ago
Hi jaryszek ,
As i suggested above, avoid relying on parameter switching at runtime.
- Power BI evaluates all branches of the if condition during dataset refresh (even unused ones), so just having CSV logic in the query causes refresh to fail, unless it's a cloud-accessible file.
- A data gateway is always required for on-prem SQL Server, regardless of whether conditional logic is used.
- To completely avoid issues, try to maintain consistency across every environment with respect to data sources to avoid failures in the higher environments as well.
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!!
jaryszek
Super User
1 year agoThank 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
Source1.
- Remove the Team-related (CSV/GitHub) data source steps to avoid refresh issues. --> the query example which you provided is staying there? oit should not have issue with
2. having this if statement will not invoke refreshing data source error in power bi service :
"You can't schedule refresh for this semantic model because the following data sources currently don't support refresh" ?
3. - Remove the Team-related (CSV/GitHub) data source steps to avoid refresh issues --> if this step is required? It means removing all data sources all the time which is time consuming...
4. If your solution still require to install gateway on Customer VM side? (it shouldnt but like i described in topic below, it is requring gateway still!)
I described your proposition here:
https://community.fabric.microsoft.com/t5/Developer/bd-p/Developer
Best,
Jacek
v-sathmakuri
Community Support
1 year agoHi jaryszek ,
As i suggested above, avoid relying on parameter switching at runtime.
- Power BI evaluates all branches of the if condition during dataset refresh (even unused ones), so just having CSV logic in the query causes refresh to fail, unless it's a cloud-accessible file.
- A data gateway is always required for on-prem SQL Server, regardless of whether conditional logic is used.
- To completely avoid issues, try to maintain consistency across every environment with respect to data sources to avoid failures in the higher environments as well.
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!!