Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Column Type Data Type clarification in Power Query

I'm trying to figure out what data types are available for the Column Type field, and I've yet to come across anything in the documententation that helps with my question. I'm trying to add a column,...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Ahhh, in that case, add this to the end of the code in the Advanced Editor for that step:

     

    , Int64.Type

     

    other common types you'll use are:

     

    "type text"

    "type date"

    "type datetime"

    "type number"

    Currency.Type

    Percentage.Type

     

    An easy way to see what the exact M code is to create a temporary step that changes the data type.  Then you'll see in the Advanced Editor exactly how M writes it (type number vs. Int64.Type...never figured out why).  Then you can simply use that same spelling as the 3rd parameter of Table.AddColumn().