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
RafalK
Advocate IV
Advocate IV

Different Power BI instances generate different SQL codes!!

Hi,

I have developed a Power BI report for my client.

It is based on a DirectQuery on SAP HANA. 

The report works great when I publish it in my company domain but it is not working in the client domain.

I have checked the logs from my and client gateway and the SQL code is different!

 

How is this possible?

The only different between my domain and clients domain is the address of the SAP HANA server.

 

The problem is that when i create two visuals based on the same table but two different columns, when i click on one visual i get an error on the other. This is due to some bug in the SQL generation.

 

How is this possible?

 

Regards

 

Rafał Kun
4 REPLIES 4
RafalK
Advocate IV
Advocate IV

One more note - the report works perfectly on my Power BI Desktop and on client Power BI Desktop (December 2017)

It's only the online version that has this problem so it's probably connected to the online version or the gateway.

Both gateways are version 14.16.6XXX.X - they differ in the X numbers.

Rafał Kun

Hi @RafalK,

When you publish the report to service, and refresh the data using gateway, it will return error because the datasource credentials in your service is different from client server. Let the client re-edit the credential of dataset, and make it work fine.

Best Regard,
Angelia

We are changing the credensials and HANA server adress each time we republish. 

Validating the code changes nothing. We will play with it a little to see if it helps.

 

The problem with the SQL generated is that it is

1. different depanding on the enviroment

2. there is an error in one of those SQL codes that is pushed to HANA:

 

here is the part of the code:

 

SELECT ...

FROM (...) AS "basetable0"

INNER JOIN (
(SELECT 'XXXXYYYY' AS "c118")) AS "semijoin1"

ON

...

 

The code is missing "From". 

If i write it like this:

 

SELECT ...

FROM (...) AS "basetable0"

INNER JOIN (
(SELECT 'XXXXYYYY' AS "c118" FROM dummy)) AS "semijoin1"

ON

...

 

it works. I am making the change to the code in SAP HANA Studio as I can't change the code that Power BI changes automaticaly.

This part of the code is not an SQL that I pass on in Query Editor but rather something that Power BI adds when I filter one visual by another.

 

In the OTHER SQL that is actually working this filter is applied with a simple WHERE:

 

SELECT ...

FROM (...) AS "t10"

WHERE ("t10"."PROJECT" = 'XXXXYYYY')

...

Rafał Kun
Anonymous
Not applicable

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