Forum Discussion

gra_wang's avatar
gra_wang
Helper I
8 years ago
Solved

Error when processing the data in the dataset (salesforce objects)

Seems like every time a column in a salesforce object gets removed or somehow altered, I get this error when attempting a scheduled refresh.   Here is an example: The column that was removed...
  • pablobarra's avatar
    8 years ago

    Hi gra_wang

     

    You need to remove the steps that are "removing" columns.

     

    First get all data as you are doing now, and in an early step you can select the columns you want to use in your report and apply a step that is "Remove other columns". If you need you can edit the step with double click and add columns.

     

    The query (M code) will be like this:

    _______________

    let
    Source = Salesforce.Data(),
    Account = Source{[Name="Account"]}[Data],
    #"Removed Other Columns" = Table.SelectColumns(Account,{"Id", "Name"}),
    #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each ([Id] = "0010O00001mY123QAC"))
    in
    #"Filtered Rows"

    __________________

     

     

    Pablo