Forum Discussion

Stefan-Mladenov's avatar
Stefan-Mladenov
New Member
1 year ago
Solved

Need Official Guidance on Resolving “Unable to Combine Data” Error in Power BI Service

Hi everyone, During the development of Power BI reports, I frequently encounter a recurring issue. In certain cases, due to specific requirements, I need to reference other tables in my M code. Whil...
  • Poojara_D12's avatar
    Poojara_D12
    1 year ago

    Hi Stefan-Mladenov 

    In API-based scenarios where no on-premises data gateway is used, and dynamic query referencing is essential, the most reliable way to prevent the “Unable to combine data” error in Power BI Service is to ensure all API calls and referenced queries share the same privacy level—ideally marked as “Public”—and avoid crossing privacy boundaries between queries. In Power BI Desktop, go to File > Options and Settings > Data Source Settings, locate all related web/API sources, and explicitly set their privacy levels to Public if the data isn't sensitive. Then republish the model to Power BI Service.

     

    Additionally, structure your queries so they all reference a shared base function or query, which ensures Power BI treats them as one unified source during evaluation. You can also flatten or buffer intermediary results using Table.Buffer at strategic points to prevent Power BI from triggering separate evaluations or partitions. Avoid using try ... otherwise to patch errors, as it often hides the root problem and can still trigger privacy errors during service refresh. If the API response is complex, consider extracting reusable logic into Power BI dataflows, which often handle privacy evaluation more gracefully and allow reusing tables with clearer lineage and less error-prone merging.

     

    By aligning privacy settings across API queries, using shared base functions, and buffering results where folding isn’t needed, you can consistently avoid this error in the Power BI Service—even without a gateway.

     

  • v-kpoloju-msft's avatar
    1 year ago

    Hi Stefan-Mladenov,

    Thank you for reaching out to the Microsoft fabric community forum. Additionally, thank you to Poojara_D12, for his input regarding this issue. I have identified several alternative workarounds that may assist in resolving the thread.

    The "Unable to combine data" error in Power BI Service is primarily due to strict privacy level enforcement, which differs from the behaviour in Power BI Desktop. In the Service, Power BI prohibits data combination across sources with incompatible or undefined privacy levels, even if the queries are within the same file. 

    This issue arises when referencing one query/table from another, as Power BI interprets it as a cross-source data combination that breaches privacy isolation rules.

    Use Table.Buffer Wisely: When referencing another query, wrap it in Table.Buffer at the point of use to materialize the table and break folding:

    let
    
        Buffered = Table.Buffer(SourceTable),
    
        Result = Table.SelectRows(OtherTable, each [ID] = Buffered[ID])
    
    in
    
        Result


    Minimize Query Dependencies: Flatten complex query chains where possible to reduce dependency evaluation issues. Embed Logic Directly: Instead of referencing an entire query, embed only the necessary logic or values into the consuming query.

    Align Privacy Levels: Ensure all data sources involved have compatible privacy levels (e.g., Organizational or Public) to avoid privacy conflicts. Utilize Power BI Dataflows: For larger or more complex logic chains, consider using dataflows to offload logic and avoid combining queries within the same dataset.

    The Power BI Service enforces data privacy at runtime and prevents unsafe data combinations. Although workarounds such as Table.Buffer or try...otherwise can be useful, the most dependable solution is to restructure your query logic to avoid unsafe combinations and ensure privacy level alignment.

    Kinly refers to the below following documentation links for better understanding:
    Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Learn
    Data refresh in Power BI - Power BI | Microsoft Learn
    Table.Buffer - PowerQuery M | Microsoft Learn

    Also please refer to the below solved thread which is useful:
    Solved: Unable to combine data - Power BI Service Refresh ... - Microsoft Fabric Community

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

    Thank you for using the Microsoft Community Forum.