Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to create a Data type table

Hi All, may I know is there any way I can create a table like this(Data type for each column) in PowerQuery?

Column NameData Type
IDWhole number
NameText
CostDecimal number

 

Thanks so much!

  • Anonymous  Yes, you can get the Column Name and Datatypes of the column and other informations about the schema using the below M Code.

     

    #"Column Names" = Table.Schema("Table Name")

     

    Once you get all the information, you can then keep whatever is required for your need and rest you can or remove.

     

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍

     

1 Reply

  • ghoshabhijeet's avatar
    ghoshabhijeet
    Solution Supplier

    Anonymous  Yes, you can get the Column Name and Datatypes of the column and other informations about the schema using the below M Code.

     

    #"Column Names" = Table.Schema("Table Name")

     

    Once you get all the information, you can then keep whatever is required for your need and rest you can or remove.

     

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍