none
Excel 2016 - Power Query - Functions - Table.AddColumn RRS feed

  • Question

  • The fourth parameter of the function:

    Table.AddColumn(table as table, newColumnName as text, columnGenerator as function,  optional columnType as nullable type) as table

    is intended to enable defining a columnType, but I have not been able to get it to work for various power query types such as logical and number. The documentation at https://msdn.microsoft.com/en-us/library/mt211003.aspx remains extremely sparse.

    How should the columnType be specified?



    Friday, August 12, 2016 5:46 PM

Answers

  • Found it.  For the benefit of others, the answer it to precede the type word with the keyword "type", hence, for example:

    type logical

    This can be found in section 12.2.3.25 of the PDF document, "Microsoft Power Query for Excel Formula Language Specification", August, 2015.

    Still, it would be great if the examples in the online formula reference could be enhanced.

    Friday, August 12, 2016 8:30 PM

All replies

  • Found it.  For the benefit of others, the answer it to precede the type word with the keyword "type", hence, for example:

    type logical

    This can be found in section 12.2.3.25 of the PDF document, "Microsoft Power Query for Excel Formula Language Specification", August, 2015.

    Still, it would be great if the examples in the online formula reference could be enhanced.

    Friday, August 12, 2016 8:30 PM
  • Hi David,

    Good to see you are unblocked.

    Thank you for sharing your solutions and experience here. It will be very beneficial for other community members who have similar questions.

    Regards,

    Ethan Hua


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Monday, August 15, 2016 5:16 AM
    Moderator