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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
modi123p
Helper III
Helper III

Error: [Unable to combine data] References other queries or step so it may not directly access data

Hi, 

I m seeing the below error:

[Unable to combine data] Section1/fnGetDataFlowData/Source references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.. The exception was raised by the IDbCommand interface

 

We have several data flows based on views specific to the Business Unit.

As data size for all BU would be very large and we have data flows specific to the BUs I thought it would be better to parameterise and bring in data flows based on the BU for which report is designed.

 

Step 1: Bring in a table that contains the list of all required dataflows (master data flow table is not enabled and the refresh disabled)

 

let
Source = PowerBI.Dataflows(null),
#"Filtered Rows" = Table.SelectRows(Source, each ([workspaceName] = "ABCD" or [workspaceName] = "EFGH")),
#"Expanded Data" = Table.ExpandTableColumn(#"Filtered Rows", "Data", {"dataflowId", "dataflowName"}, {"dataflowId", "dataflowName"}),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded Data",{"workspaceId", "dataflowId", "dataflowName", "workspaceName"}),
#"Added Key" = Table.AddColumn(#"Removed Other Columns", "Key", each if(Text.Contains([dataflowName], "dailyinventory")) then "DI"
//else if(Text.Contains([dataflowName], "matbatch")) then "MB"
else if(Text.Contains([dataflowName], "monthlyinventory")) then "MI"
else if(Text.Contains([dataflowName], "material_movement")) then "MM"
else if(Text.Contains([dataflowName], "prod_cons_qty")) then "PC"
else if(Text.Contains([dataflowName], "quality")) then "QA"
else "", type text),
#"Filtered Required Data Flows" = Table.SelectRows(#"Added Key", each Text.Contains([workspaceName], @BU) and ([Key] <> "")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Required Data Flows",{"workspaceName"}),
#"Inserted Text After Delimiter" = Table.AddColumn(#"Removed Columns", "Text After Delimiter", each Text.AfterDelimiter([dataflowName], "_", 2), type text),
#"Renamed Columns" = Table.RenameColumns(#"Inserted Text After Delimiter",{{"Text After Delimiter", "entityName"}})
in
#"Renamed Columns"

 

Step 2: Use the above table with fnGetDataFlowData to filter and use the required table basaed on the key:

 

let
Source = (key as text) => let
DFSource = Table.Buffer(_DataFlowMasterList),
#"DFSource Rows" = Table.SelectRows(DFSource, each ([Key] = key)),
wId = #"DFSource Rows"[workspaceId]{0},
dId = #"DFSource Rows"[dataflowId]{0},
eId = #"DFSource Rows"[entityName]{0},

Source = PowerBI.Dataflows(null),
Workspace = Source{[workspaceId=wId]}[Data],
DataFlow =Workspace{[dataflowId=dId]}[Data],
Data = DataFlow{[entity=eId]}[Data]

in
Data
in
Source

 

While this works fine on PBI Desktop, Data refresh is failing on PBI Service.

 

Kindly help.

 

Thans & Regards,
Mannu

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @modi123p  ,

 

You can view these contents, I hope to help you:

https://community.powerbi.com/t5/Service/Unable-to-combine-data-Please-rebuild-this-data-combination...

https://community.powerbi.com/t5/Service/Unable-to-combine-data-Accessing-data-sources-that-have-pri...

https://www.excelguru.ca/blog/2015/03/11/power-query-errors-please-rebuild-this-data-combination/

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have already gone through the below articles.

* Made sure that the DataFlowReference table is not Enabled for load, Not included in Report Refresh

* Parameter is set to Text type  (not a list/query referencec and type is set to Text )

 

I have already gone through the below articles.

* Made sure that the DataFlowReference table is not Enabled for load, Not included in Report Refresh

* Parameter is set to Text type  (not a list/query referencec and type is set to Text )

 

But still, changing parameter does not change the value.

Changing Parmaeter on PBI Desktop works. But not on PBI Service

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors