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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Salesforce.Data() refresh error - Expression.Error:The column "xxxx" of the table wasn't found.

Hi,

 

I'm able to connect and refresh data from Salesforce using my local Power BI client, but when I publish and schedule a refresh I get the following error:

 

Last refresh failed: Thu May 11 2017 17:25:29 GMT-1000 (Hawaiian Standard Time)
There was an error when processing the data in the dataset.
Hide details

Data source type: 
Processing error:The column 'Included_in_most_recent_quarterly_FCST__c' of the table wasn't found.

 

Unlike other posts with the same error, this column is not explicitly referenced in Query Editor / Advanced Editor.  I think it's implicitly getting referenced in this statement:

Historical_Opps_With_Payment__c = Source{[Name="Historical_Opps_With_Payment__c"]}[Data],

 

Is there a way to specify which columns I want from Source{[Name="Historical_Opps_With_Payment__c"]}[Data] instead of loading the whole table?

 

Here's the full query:

let
    Source = Salesforce.Data(),
    Historical_Opps_With_Payment__c = Source{[Name="Historical_Opps_With_Payment__c"]}[Data],
    #"Added Custom" = Table.AddColumn(Historical_Opps_With_Payment__c, "cKey", each DateTime.ToText([CreatedDate])&[Opportunity_Name_ID__c]&[Fiscal_Year_P_S__c]),
    #"Added Conditional Column" = Table.AddColumn(#"Added Custom", "cRecordCapturedOn", each if [RecordCaputuredOn__c] = null then [CreatedDate] else [RecordCaputuredOn__c] ),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Conditional Column",{{"cRecordCapturedOn", type date}})
in
    #"Changed Type"

 

Here's what I've tried so far:

  • Added a step in Query Editor to delete Included_in_most_recent_quarterly_FCST__c
  • Deleted my report and data source from https://app.powerbi.com/groups/ then re-published
  • In the app, I went to DATASETS / Salesforce / Settings / and re-entered my Data source credentials

Additional context:

  • I'm publshing to a group workspace
  • Gateway connection = Connect directly
  • Authentication method = OAuth2 and the user account has two factor authentication enabled.  Wondering if that has something to do with it?
Status: Needs Info
Comments
v-haibl-msft
Employee

@RanjeetTNTP

 

Please try to use Table.SelectColumns function to select the needed columns instead of the whole table.

 

Salesforce_1.jpg

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
RanjeetTNTP
Regular Visitor
Thanks Herbert! Our Salesforce admin changed a security setting on her side and I was able to manually refresh the data successfully today. We'll see if the automated refresh works tonight, but it looks like this error was related to a security issue and nothing to do with the script. If the automated refresh fails then I'll try your suggestion.
RanjeetTNTP
Regular Visitor

The automated refresh completed successfully so I'm closing this issue.  Thanks again, Herbert!