Forum Discussion

rbitente's avatar
rbitente
New Member
7 years ago
Solved

DataSource.Error: Query is either selecting too many fields or the filter conditions

Hello Guys !

 

I am facing the folling problem to retrieve the objetic list from Salesforce

 

DataSource.Error: Query is either selecting too many fields or the filter conditions are too complicated.
Detalhes:
List

 

I don't know how to solve it, my objetic are big (a lot of colluns) but I don't know how to list or to import only the collumns I need (no collumns appear)

 

DO you know how to solve it ?

  • Stachu's avatar
    Stachu
    7 years ago

     

    let
    Fonte = Salesforce.Data(),
    Payroll_element__c = Fonte{0}[Data]
    in
    Payroll_element__c

    the highlighted in red part means that you drill down to the first row of the column Data - and that's not what you want correct?


    if Table.ColumnNames worsk for you, then you can try something like this:

     

    let
        Fonte = Salesforce.Data()
        ColumnsToBeSelected = Table.FromList(Table.ColumnNames(Fonte)),
        FilterColumns = Table.SelectRows(ColumnsToBeSelected, each ([Column1] = "Data")),
        FilteredColumnsAsList = FilterColumns[Column1],
        Custom1 = Table.SelectColumns(Fonte, FilteredColumnsAsList)
    in
        Custom1

    assuming that Table.ColumnNames returns a list of columns from your Salesforce dataset, you could then filter the relevant columns only when selecting the FilterColumns step

7 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi rbitente ,

    For your issue, please have a reference of this similar thread which had been solved.

    If you still need help, feel free to ask.

    Best  Regards,

    Cherry

     

    • rbitente's avatar
      rbitente
      New Member

      I tried to do what this post tells, but didn't work.

       

      My advenced editor was like this:

       

      let
      Fonte = Salesforce.Data(),
      Payroll_element__c = Fonte{[Name="Payroll_element__c"]}[Data]
      in
      Payroll_element__c

       

      And I modified to this

       

      let
      Fonte = Salesforce.Data(),
      Payroll_element__c = Fonte{0}[Data]
      in
      Payroll_element__c

       

      But is not bringing what I need.

       

       

      • Stachu's avatar
        Stachu
        Community Champion

         

        let
        Fonte = Salesforce.Data(),
        Payroll_element__c = Fonte{0}[Data]
        in
        Payroll_element__c

        the highlighted in red part means that you drill down to the first row of the column Data - and that's not what you want correct?


        if Table.ColumnNames worsk for you, then you can try something like this:

         

        let
            Fonte = Salesforce.Data()
            ColumnsToBeSelected = Table.FromList(Table.ColumnNames(Fonte)),
            FilterColumns = Table.SelectRows(ColumnsToBeSelected, each ([Column1] = "Data")),
            FilteredColumnsAsList = FilterColumns[Column1],
            Custom1 = Table.SelectColumns(Fonte, FilteredColumnsAsList)
        in
            Custom1

        assuming that Table.ColumnNames returns a list of columns from your Salesforce dataset, you could then filter the relevant columns only when selecting the FilterColumns step

  • Hello rbitente 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 rbitente,

     

    This error means the Salesforce query contains too many fields or overly complex filter conditions. Select only the fields you need using the Salesforce connector’s Select Query advanced option, then apply the required filters. Disabling unnecessary relationship columns may also reduce query complexity.

     

    Power BI Connector for Salesforce by Metrica Software provides another way to select objects and fields, apply filters, preview the output, and use SOQL when needed: https://appexchange.salesforce.com/appxListingDetail?listingId=31526f0e-abd8-4cb5-bd1a-3bd56b5c0577

     

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

     

    Cheers,
    Metrica Team