Forum Discussion

arobin's avatar
arobin
Frequent Visitor
9 years ago
Solved

Create Connection: This query contains transformations that cannot be used for live connection

 I am very new to Power BI and I am not familiar with the message I encountered when trying to make a DirectQuery connection to SQL Server. Can anyone advise what does "Create Connection: This query contains transformations that cannot be used for live connection" means? I was trying to get a live data in SQL Server using SQL statement below.

 

select a.PAYMENT_TYPE, count(a.PAYMENT_TYPE)
from VENDOR_ACCOUNTS a,
(select * from VENDOR_Keys where RemoteSystem='ECC_VENDOR') b
where a.InternalId=b.InternalId
GROUP BY a.PAYMENT_TYPE
order by a.PAYMENT_TYPE

 

when I  cliked on load data the said mesage appeared.

is there something wrong in my query that affects the live connection?

  • Hi arobin,

     

    Could you please test using a simple SQL statement? You can create a simple table named TableA in your database, then type the basic query statement using like: select * from TableA in Direct Query model, check if it works. Some function is not used in Direct Query model. If it works fine, it will document the function is unable. You'd better test step by step.

     

    If the function is not used, please create a new result table, then import them to Power BI. If you have any issue, please let me know.

     

    Best Regards,
    Angelia 

17 Replies

    • arobin's avatar
      arobin
      Frequent Visitor

      Hi Thiyagu,

       

      I don't have SSMS installed yet. Trying to get the installer. I am using Oracle SQL Developer to test the query and that test query runs fine there. I wonder if that kind of query runs fine in SSMS. Thank a lot for your response Thiyagu. It helped me a lot as a newbie here.

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi arobin,

        If the solution help your resolve your problem, please mark the corresponding reply as answer, so that other people can find solution easily.

        Best Regards,
        Angelia

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi arobin,

    It should be error in the SQL statement. You'd better join the two table together, and "where a.InternalId=b.InternalId" is improper. You'd better propram the SQL like the following syntax.

    select a.*from Table a
    
    inner join
    
    (select * from Table2) b
    
    on  a.InternalId=b.InternalId
    
    GROUP BY a.PAYMENT_TYPE
    order by a.PAYMENT_TYPE

    And as the Thiyagu, please test it successfully, then use it to import the data.

    Best Regards,
    Angelia

    • arobin's avatar
      arobin
      Frequent Visitor

      Hi Angelia,

       

      Thanks a lot for your response appreciate it a lot. I will re-create my query.

       

       

  • hiralsoni_001's avatar
    hiralsoni_001
    Frequent Visitor

    Hi everyone,

     

    I am not able to connect a direct query from sql to power bi

    it shows 'this query contains transformations that can't be used for a live connection'

     

    Can you please help. Basic query like select * , I am able to run not a big query contains many tables in it. I tried the query in SQL server , it works and results came too.

     

    Thanks in advance.