Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Probem on report after change Data Source type

We work with a product that can work in Oracle or SQL Server DB. Power BI access to this DB to extract information in Import data mode. Our goal now is to create some template report than can work in booth DB only changing the data source from Oracle to SQL Server.

 

The problem we're facing is: When we change the data source type, from Oracle to SQL Server(using PQ Editor -> Advance Editor), Power BI is not able to re-paint properly the report. The graphical object appear like unproperly configure and don´t re-paint. In example, a bar graph with a Total Sales and client is not able to re-paint because don´t find Total Sales column in the new database, event the name of the column is the same. When I remove the incorrect fields and choose the correct one its works fine but this is not the idea.

 

Can anyone give us an idea about how to solve the problem?

 

Thanks in advance.

Regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for your help.

I found a solution to my problem. I created an Oracle view (and the equivalent in SQL Server) with all the information than I need in my report. Them, in the report instead to select the tables involves, I select directly to the view typing the name of the fields of the query in the select section rather than use select *. After that, I change the DB source from Oracle to SQL Server (or vice-versa) and everything looks to be working fine. I Still haven´t tested enough but my first test case works.

Anyway, here is my actual M-Script code:

 

-Oracle:

    let
    Origen = Oracle.Database("OracleHarina", [HierarchicalNavigation=true, Query="select COMPANY, PRODUCT, PRODUCTTYPE, TOT_VOL, VOLUMEUNIT from V_TEST_VIEW"])
    in
    Origen

(OracleHarina is the entry name in tnsnames.ora)

 

-SQLS:

    let
    Origen = Sql.Database("42.112.110.220", "demoharina", [HierarchicalNavigation=true, Query="select COMPANY, PRODUCT, PRODUCTTYPE, TOT_VOL, VOLUMEUNIT from V_TEST_VIEW"])
    in
    Origen

 

Thanks in advance!!

View solution in original post

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

could you post your M-Script (Advance Editor) ?

Both versions, the SQL Server version and the Oracle corrected version.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Thanks for your help.

I found a solution to my problem. I created an Oracle view (and the equivalent in SQL Server) with all the information than I need in my report. Them, in the report instead to select the tables involves, I select directly to the view typing the name of the fields of the query in the select section rather than use select *. After that, I change the DB source from Oracle to SQL Server (or vice-versa) and everything looks to be working fine. I Still haven´t tested enough but my first test case works.

Anyway, here is my actual M-Script code:

 

-Oracle:

    let
    Origen = Oracle.Database("OracleHarina", [HierarchicalNavigation=true, Query="select COMPANY, PRODUCT, PRODUCTTYPE, TOT_VOL, VOLUMEUNIT from V_TEST_VIEW"])
    in
    Origen

(OracleHarina is the entry name in tnsnames.ora)

 

-SQLS:

    let
    Origen = Sql.Database("42.112.110.220", "demoharina", [HierarchicalNavigation=true, Query="select COMPANY, PRODUCT, PRODUCTTYPE, TOT_VOL, VOLUMEUNIT from V_TEST_VIEW"])
    in
    Origen

 

Thanks in advance!!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.