Forum Discussion

julesdude's avatar
julesdude
Icon for Post Partisan rankPost Partisan
4 years ago

How can I avoid error - [Unable to combine data]...references other queries or steps...Please rebuil

Hi there,

2 weeks now i've been battling with this issue but can't find anything that will work despite multiple methods and workarounds.

I have a report that began life as a pbix. Worked fine when opening/running as that, but when published to the Service, will provide the following error when refreshing on demand or when scheduled:


Processing error
[Unable to combine data] ............ references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

My report contains about 6 queries generally speaking. Each query gets data from one system. Method used is web API - Anonymous connection which I am using in Power Query. First a token is established from the system via API, followed by using that token with user's email and password and some other credentials to return responses. Each query of the 6 needs to return two tables - one for column id and name, the other table for content, and following steps merge these two tables to together to make one table that is loaded into the report for the data viz tools.

 

The query path/reference that this error indicates above leads to a query with just this simple line:

 

 

Get_columns = Json.Document(Web.Contents(#"loginUrl",#"logindata_COLUMNS (5)"))

 

 

loginurl is simply a parameter that contains the URI I am sending my API request to.

 

logindata_COLUMNS (5) contains the following code:

 

let


    logindata_COLUMNS=[
      Headers = [
        #"V-Locale"= "en-gb",
        #"V-TimeZone"= "Europe/London",
        #"Content-Type"="application/json;charset=UTF-8",
        #"V-Feature"="6",
        #"V-Token"=V_Get_Token,
        #"V-Organization"="9999",
        #"V-Email"=V_E
      ],
      RelativePath = "metadata/columns",
      Content=Text.ToBinary(V_logindata_body)
      ]
in
    logindata_COLUMNS

 

Some of these in logindata_COLUMNS (5) are linking to other steps (i.e. token) and referencing parameters. All which are functioning corretly - the token comes back fine and parameters should be fine to be called anywhere in a Service refreshing report.

 

Getting back to the first snippet where it is referncing to be the problem line - nothing else is containined in this query. It is just that line. I have tried adding everything together in one big query so it is not referencing anything else but the parameters, and conversely tried to separate each component into individual queries to break it up as much as possible into constiruent parts so that the call of the data is separated from steps that contain modifying the data in the table afterwards. Both approaches don't seem to get rid of this error which will identify some problem somewhere whether it's the line above or not.

 

What's the best practice here? How can I be certain that my report I'm creating on the desktop will work in the service? How can I be sure that this or any of these parts of the queries could work as a dataflow as well (it doesn't, I tried it as that too)?

I can't find much out there that tells you how you should specifically structure things in your reports to prevent these issues arising. So any help is appreciated.

License is Pro.

7 Replies

  • Read the Formula Firewall articles from Chris Webb and Ben Gribaudo.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey when you published to pbi service, what kind of configuration do you have? Are you able to show us? How many data sources have you connected in this report? all web api connetion?

    • julesdude's avatar
      julesdude
      Icon for Post Partisan rankPost Partisan

      Hi Anonymous lbendlin 

      It's all web api connection to one system. There is no gateway involved, if that's what you mean. I'm connecting Anonymously and the privacy level is Organizational.

      Each query call works a bit like this:

      0a Get a token for the session to be used with the below queries:

      let
      
          
          loginData = [email=V_E,password=V_P, featureId= "55"],
          loginOptions = [
            Headers = [
              #"V-Locale"= "en-gb",
              #"V-TimeZone"= "Europe/London",
              #"C-Type"="application/json;charset=UTF-8",
              #"V-Feature"="6"
              ],
            RelativePath = "session",
            Content = Json.FromValue(loginData)
          ],
          Get_Token = Json.Document(Web.Contents(V_loginUrl, loginOptions),9999)[token]
      in
          Get_Token

      Then the queries below use the token acquired above for their calls

      (Build table 1)
      1a Get headers for the table id, tranpose it and remove 8 bottom rows to keep just row 1

      1b Get content for the table id

      1c Merge a and b together to form one table and promote first row as header row

       

      That wasn't quite working at first and I got the above error message. Scouting around on this forum searching for those with a similar error, one solution worked for a guy by consolidating all the queries into one, so I merged the above into one bg query which did work. 

       

      However, I need the processes x 6 to bring in 6 tables into the report for analysis. When I repeated the steps that's when I got the above error message again. So I know it works for a single table, but seems to knock over at nth table.

      So I don't know what is going on.

       

  • lbendlin Hi

    Thanks I will take a look. However, athought the error message is similar, the first two words 'Formula Firewall' to not appear in the message so i am not sure but possibly won't be an issue relating to this.