none
Is it possible to define column types when pulling data from Salesforce? RRS feed

  • Question

  • Hello,

    I'm working on getting Salesforce data into Excel using Power Query for a project. However, I'm running into an issue with field types. Is it possible to define a column type at the moment the data is being pulled from Salesforce? I am aware I can transform data after it is read, however the issue I'm having is with a (custom) field in Salesforce where Power Query expects 32-bit INT, but a decimal value is being processed. I've tried to transform the field to text and back to a number (not INT), but it doesn't seem to help.

    All values in this specific field are decimals. However, the first set of records may not hold a value in it, since the custom field was created later on and data was populated from that moment on.

    As an alternative, is there a way to pre-process the data coming from Salesforce, before it's interpreted by Power BI or Power Query?

    Here is the instructions in Power Query:

    let
        Source = Salesforce.Reports(),
        #"00O1N000006G12HUAS" = Source{[Name="00O1N000006G12HUAS"]}[Data]
    in
        #"00O1N000006G12HUAS"

    And the result:

    Expression.Error: The number is out of range of a 32 bit integer value.
    Details:
        0.932071759


    The same goes for Power BI.

    Thank you!

    Ray

    • Edited by Aesrey Thursday, December 21, 2017 12:18 AM Edited for readability
    Thursday, December 21, 2017 12:13 AM

Answers

  • Hi Aesrey, You can transform all data into text first, then based on your need to transform them into the data types as per your request. The reason to do that Is text should not return error at the first time and give you opportunity to manually change specific column to specific data types. Kind regards, Time Sun
    Sunday, December 31, 2017 8:09 PM