Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

undefined

I am new to power Bi and do not know M code. I am trying to pull object data from Salesforce but the object is so large I am getting an error "Datasource.error: query is either selecting too many fields or conditions are too complicated." I have selected the "Advanced Editor" option and tried to just pull in specific fields. However, when I do this I get a different error: 

Expression.Error: The field 'Tier_LOS__c' of the record wasn't found.

Details:

    Name=Loan__c

    Data=Table

    Kind=Table

    Label=Loan

    Hidden=FALSE

 

I know this is user error, I am not typing something correctly in the Advanced Editor box but I do not know what I am missing. Please help. Here is what I have in advanced editor:

 

let
Source = Salesforce.Data("https://login.salesforce.com/", [CreateNavigationProperties=true]),
Loan__c = Source{[Name="Loan__c"]}[Note_Date__c]



in
Loan__c

 

3 Replies

  • Hi, were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Salesforce connector in the data sources list:

     

     

    After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:

     

     

    There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor.  Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

     

  • metrica's avatar
    metrica
    Post Prodigy

    Hi there,

     

    The issue is that Source{[Name="Loan__c"]} returns the Salesforce navigation record, not the actual object data table. You need to open the object’s Data table first, then select the required fields. Also confirm that Note_Date__c and Tier_LOS__c are the exact Salesforce API names and that the user has field-level access.

     

    Power BI Connector for Salesforce by Metrica Software offers another way to prepare a narrower Salesforce dataset by selecting objects and fields, applying filters, previewing the output, and using SOQL mode when needed:
    https://appexchange.salesforce.com/appxListingDetail?listingId=31526f0e-abd8-4cb5-bd1a-3bd56b5c0577

     

    Docs:
    https://metricasoftware.com/docs/salesforce/

     

    Cheers,
    Metrica Team