Forum Discussion

luckygirl's avatar
luckygirl
Helper I
1 year ago
Solved

Importing SQL data to PBI

Hi, I have very large tables having more than 1 million records and assume they look like following. For a particular application, I am interested only on data regarding customers of prodtype "A".  ...
  • pankajnamekar25's avatar
    1 year ago

    luckygirl 

     

    You can try this

    SELECT *
    FROM Alert
    WHERE CusID IN (
    SELECT DISTINCT CustomerID
    FROM Applications
    WHERE ProdType = 'A'
    );

     

    Thanks,
    Pankaj

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

  • V-yubandi-msft's avatar
    1 year ago

    Hi luckygirl ,

    pankajnamekar25 ,  proposed query efficiently filters the Alert table by selecting customers from the Applications table with ProdType = 'A', meeting your requirement. This method minimizes unnecessary data loading. To enhance performance, please ensure that CustomerID in Applications and CusID in Alert are indexed.

     

    Let us know if further optimizations are needed.
    If your issue is resolved, please mark it as the accepted solution. This will help others facing a similar issue.