Forum Discussion

BhargavTomar's avatar
BhargavTomar
New Member
2 months ago
Solved

Power BI: Can't determine relationships between the fields while consuming SAP Analytical CDS Query

Hi Everyone,

I am trying to consume an SAP S/4HANA Analytical CDS Query in Power BI Desktop using the SAP BW Application Server Connector (DirectQuery).

Environment:
- Power BI Desktop, connecting via SAP Business Warehouse Application Server connector
- Data source: SAP ABAP CDS Analytics Query view (Analytics Cube-based)
- Model mode: DirectQuery

Issue:


We're consuming an SAP CDS Analytics Query view in Power BI via the SAP BW connector. Several fields from this single CDS view import correctly as flat columns in one table, but two specific fields (Status Text and Status Description, etc.) each get split into their own separate table, with a "Level 01" hierarchy sub-item under each (e.g. "Status Text" table -> "Status Text Level 01").

Because these come in as separate tables instead of columns in the same table, Power BI throws:

 

"Can't determine relationships between the fields"

whenever we try to use both fields together in a visual.

 

Additional context:
- The underlying characteristic (Object Status) is derived from a status-tracking logic where one object can have multiple status rows (active/inactive flags), resolved via a join to a status text table.
- Other fields in the same CDS view (Plant, Order Type, Order Number, etc.), which are simple single-valued attributes, come through fine as flat columns with no splitting — only the status-related fields split into "Level 01" tables.

What I've tried:
- Attempted to manually create a relationship in Power BI's Manage Relationships between the "Level 01" columns of the two split tables — as soon as a second field from a different "Level 01" table is added to a visual, Power BI still shows "Can't determine relationships between the fields," even after the manual relationship is created
- Testing with a separate, simple CDS view (basic 2-table join, no status fields) — this loads fine as one flat table, suggesting the issue is specific to hierarchy/multi-valued characteristics being split by the connector

 

 

Screenshot 1: Status Text and Status Description are loaded as two separate tables, each with a "Level 01" sub-column, instead of coming through as flat columns in the same table

 

 

Screenshot 2: Error shown when trying to use both fields together in the same visual — "Can't determine relationships between the fields."

 

 

Question:
Is this "Level 01" splitting expected behavior of the BW connector for hierarchy-enabled/status characteristics? Since manually relating the split tables doesn't resolve the relationship error either, is there a way to force these fields to load as flat attributes instead (a connector setting or a CDS-level annotation), rather than having them split into separate hierarchy tables in the first place?

  • Hi BhargavTomar,

    Thank you for the update and for sharing the screenshots.

     

    According to the official Microsoft documentation:

    • In SAP BW, every Characteristic includes a Level 01 object, even when no hierarchy is defined. The Level 01 object represents a flat list of all members for that characteristic. For characteristics with multiple hierarchies, only one hierarchy or the Level 01 object can be selected.
    • When connecting to SAP BW using DirectQuery, Power BI exposes the available objects based on the metadata returned by the SAP BW source. Additionally, the list of columns and measures is fixed by the underlying source, and relationships can't be defined in the Power BI model because they're considered inherent in the SAP BW source.

    For more information, please refer to the below official documentation:

    DirectQuery and SAP Business Warehouse (BW) in Power BI - Power BI | Microsoft Learn

    SAP Business Warehouse connector troubleshooting - Power Query | Microsoft Learn

     

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.

6 Replies

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi BhargavTomar,

    Thanks for reaching out to the Microsoft Fabric Community forum.

     

    As an initial troubleshooting step, could you confirm that you're using Implementation 2.0 of the SAP BW Application Server connector? Microsoft states that Version 1.0 has been deprecated, and new connections use Implementation 2.0.

    Also, please verify that the required SAP .NET Connector 3.0 or 3.1 is installed. During the installation, the official documentation specifies that under Optional setup steps, you should select Install assemblies to GAC.

     

    For more details, please refer to the official documentation:
    Power Query SAP Business Warehouse Application Server connector - Power Query | Microsoft Learn

     

    If the issue persists after confirming these prerequisites, please let us know.

    Thank you.

    • BhargavTomar's avatar
      BhargavTomar
      New Member

      Thanks for the guidance!

       

      I've verified both points:

      1. Implementation 2.0 – In the current Power BI Desktop version I'm using, there's no separate toggle for this under Preview Features anymore, which suggests Implementation 2.0 is now the default/standard (the old Version 1.0 option doesn't appear as a choice).

       

      2. SAP .NET Connector (NCo) – Confirmed this is now installed on the machine, with "Install assemblies to GAC" selected during setup. Restarted Power BI Desktop after installation.

      However, after re-testing, I'm still seeing the same issue - Power BI is unable to determine relationships between the split "Level 01" hierarchy tables (Status Text / Status Description), and the same "Can't determine relationships between the fields" error occurs when both are used in a visual together.

       

      Are there any other known causes for this behavior with SAP BW Cube connections - specifically around characteristics that get exposed with hierarchy/"Level 01" splitting? Would appreciate any further pointers.

      • BhargavTomar's avatar
        BhargavTomar
        New Member

        Update: To further isolate this, I tested with a completely different, simple custom CDS view (unrelated to the original Notification/Status issue) - a basic Purchasing Document query exposing Company Code, Purchasing Organization, Purchasing Document Type, Purchasing Document, and Supplier as flat fields, built as a Cube via SAP BW.

         

        Connecting to this via the SAP BW Application Server connector produces the exact same crash:

        "Something went wrong - Sequence contains more than one element"

        This occurs even before any fields are added to a visual, right when Power BI tries to build the initial connection/schema.

         

        This is a completely independent CDS view from the original one I reported (different tables, no hierarchy/status fields involved at all), which strongly suggests this isn't related to any specific CDS design or hierarchy characteristic - it looks like a more general issue with how Power BI Desktop's Modeling Engine handles BW Cube connections in DirectQuery mode.

        Attaching a screenshot of this second occurrence for reference. Both cases point to the same stack trace (GetCubeDataSourceType / System.Linq.SingleOrDefault) mentioned earlier in this thread.

         

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi BhargavTomar,

    Thank you for the update and for sharing the screenshots.

     

    According to the official Microsoft documentation:

    • In SAP BW, every Characteristic includes a Level 01 object, even when no hierarchy is defined. The Level 01 object represents a flat list of all members for that characteristic. For characteristics with multiple hierarchies, only one hierarchy or the Level 01 object can be selected.
    • When connecting to SAP BW using DirectQuery, Power BI exposes the available objects based on the metadata returned by the SAP BW source. Additionally, the list of columns and measures is fixed by the underlying source, and relationships can't be defined in the Power BI model because they're considered inherent in the SAP BW source.

    For more information, please refer to the below official documentation:

    DirectQuery and SAP Business Warehouse (BW) in Power BI - Power BI | Microsoft Learn

    SAP Business Warehouse connector troubleshooting - Power Query | Microsoft Learn

     

    I hope this helps. Please feel free to reach out if you have any further questions.
    Thank you.

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi BhargavTomar,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 


    Thank you.

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi BhargavTomar,

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you