Forum Discussion
Unable to combine data - Please rebuild this data combination - Refresh
Hi PowerBi fans.
hope you can help me out. See picture below.
Trying to call aan WebAPI. Works fine without parameters.
Using a parameter as a part of the URL works fine in desktop mode.
Problems start when trying to refresh the data in the PowerBi service enviroment.
Error: " [Unable to combine data] Section1/Verwachting 16 dagen/AutoRemovedColumns1 references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."
When removing the paramater from the URL ==> refresh works fine.
Any help or hint will be greatly appreciated.
Best regards,
Wouter
SOLVED - Workarround.
The issue was not using the parameter. The issue was that the parameter had a reference to a query (Suggested values). Changed the suggested values to 'any value'. Now refresh in the powerbu service works perfectly.
9 Replies
- Wouter
Resolver I
SOLVED - Workarround.
The issue was not using the parameter. The issue was that the parameter had a reference to a query (Suggested values). Changed the suggested values to 'any value'. Now refresh in the powerbu service works perfectly.
- AnonymousNot applicable
Hi Wouter
I'm getting the same error message that you solved, where I'm using a WebAPI with a changing parameter as a data source to combine data. It works fine in desktop, but when trying to refresh the Power BI model in service it fails with the message:
[Unable to combine data] Section1/CombinedVisitorQuery/Added Custom2 references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. Table: MergedVisitors.
On your solution:
"The issue was not using the parameter. The issue was that the parameter had a reference to a query (Suggested values). Changed the suggested values to 'any value'. Now refresh in the powerbu service works perfectly."
Where do you change the suggested values to 'any value'? I'm not following this logic. Do you perhaps have a screenshot of what you're doing here?
Thanks in advance.
Laurie
- arthurbchalkNew Member
Hi Laurie,
The option is found when editing in Power BI Desktop.
Navigate to 'Edit Queries', locate your parameter, double click to enter the Manage Parameter mode.
Directly above where your parameter value has been entered, there is an option that is set as "List of Values" or "Query"
simply click the drop down and select "Any Value".
Obviously you will then need to replublish
I've just done this and it has solved my issues.
Arthur B Chalk - eXPD8 Analytics
- AnonymousNot applicable
Hi guys !
I'm getting the same error message like Laurie. The message refers to a table.
Message[Unable to combine data] Section1/GroupesDActivites/AutoRemovedColumns1 references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. Table: ActivityGroups.
In this specific table, I selected some columns, extand some of them to get fields from others table, merge two columns and add customs columns with concatenated values...
I can refresh my report correctly on desktop but not online where I get this error.
I don't use any parameters then I cannot use the Wouter's workaround.
Do you think doing all these steps could be the root cause ?
Thanks,
Damien
- miobrado
Microsoft Employee
Hey all,
here's my solution to the problem in case someone still ends up reading this thread, struggling with the Firewall:
Processing error:
[Unable to combine data] Section1/MyQuery/Source references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. The solution is based on Behind the Scenes of the Data Privacy Firewall and has two parts to it:
- Put everything into a single Power Query M expression (Step).
Go to Power Query Editor, right click the query, select Advanced Editor, then make sure to re-write your Power Query M expressions to access all data sources in a single Step, without any references to other steps or queries. See the example below for more details. - Set Privacy Level to Organizational (or Public) for each data source.
From Power Query Editor, go to "File -> Options and settings -> Data source settings -> Data sources in current file", select each data source in turn and click on "Edit Permissions..." button, then select Organizational (or Public) for the Privacy Level and confirm with OK. Must have the same Privacy Level for each data source and it must be either Organizational or Public.
Here's an example to demonstrate the idea:
- First select a parameter value from one data source (simplified here to just select a constant)
- Then use the resulting value to build a query executed on another data source
First let's see the version that works well in Power BI Desktop, but does not work when published to a Power BI Service workspace:
let Count = Number.ToText(Record.Field(Table.SingleRow( Sql.Database("myserver1.database.windows.net", "mydb1", [Query="select 10 as Count"])), "Count")), Result = Sql.Database("myserver2.database.windows.net", "mydb2", [Query="select top " & Count & " * from sys.objects order by create_date desc"]) in ResultIt does not matter here whether I had the Count as a separate query, or as a separate step. Either way, it ends up in a different "partition" and gets blocked by the Firewall.
Now let's see the version that works when published to a Power BI Service workspace:
let Result = Sql.Database("myserver2.database.windows.net", "mydb2", [Query="select top " & Number.ToText(Record.Field(Table.SingleRow( Sql.Database("myserver1.database.windows.net", "mydb1", [Query="select 10 as Count"])), "Count")) & " * from sys.objects order by create_date desc"]) in ResultNow that everything is done in a single Step (named Result here), the Firewall will not complain as long as both data sources have the same Privacy Level (either Organizational or Public).
Hope this helps, cheers!
- Put everything into a single Power Query M expression (Step).