Forum Discussion

MStP's avatar
MStP
Helper I
4 years ago
Solved

Expression Error for SAP HANA Data Source: The key did not match any rows in the table

Hello,

 

I've seen this issue posted before but not for an SAP HANA data source. I get the following error ONLY when trying to refresh the dataset on the web service. There are no issues with connecting in the .pbix file or during initial publication. The data source is connected and returning data.

 

There are other HANA views in the dataset that do not cause issues. I have tried deleting the data source referenced below and recreating it from scratch and I still get the same issue.

 

Is this something that needs to be corrected on the HANA side? I'm not sure where to start here. 

 

Thanks,

 

Michael

 

 

  • This message appeared because the specific HANA view was not made accessible for our Power BI HANA Service account. Not sure what this means but the issue is being resolved.

     

    Michael

4 Replies

  • This message appeared because the specific HANA view was not made accessible for our Power BI HANA Service account. Not sure what this means but the issue is being resolved.

     

    Michael

    • MStP's avatar
      MStP
      Helper I

      To be clear, this is an issue that needs to be addressed in HANA by enabling the view to be accessible by PBI:

       

  • metrica's avatar
    metrica
    Post Prodigy

    Hi MStP 

     

    The error was caused by the Power BI service account not having access to the required HANA view.

     

    If the goal is to analyze S/4HANA data in Power BI, you may also avoid direct HANA database connectivity altogether by using Power BI Connector for SAP: https://www.sap.com/products/data-cloud/partners/metrica-software-inc-power-bi-connector-for-sap.html

     

    It connects through activated S/4HANA OData services and provides Power BI with a ready-to-use OData endpoint, without requiring a HANA ODBC driver or direct access to HANA database views.

     

    The required data must be available through the relevant SAP OData or CDS services.

     

    A 30-day free trial is available.

     

    Documentation:
    https://metricasoftware.com/docs/sap/

     

    Cheers,
    Metrica Team

  • Hi Michael, since it works fine in Power BI Desktop but fails only during Service refresh, I’d start by checking the gateway setup, SAP HANA client version, and refresh credentials. If the issue affects only one HANA view, compare its permissions and dependencies with the views that refresh successfully. The gateway logs should help identify whether it’s a HANA-side issue or a Power BI Service connection problem.