Set A Custom Column Type in M with Zero Extra Steps

Custom columns are often the lifeblood of any M queries that you build. They give you huge amounts of power but by default remain untyped. You could add a step to type each new column after you create it, or even type them all at the end, but both imply extra steps when what you really want to do is set the data type of the column right in the same step where you define it. In this video we are going to show you how to do exactly that and end up with code that is much cleaner and easier to read.

Most common types:

  • type binary
  • type date
  • type datetime
  • type datetimezone
  • type duration
  • type list
  • type logical
  • type null
  • type number
  • type record
  • type text
  • type time
Brian Grant

Brian Grant

Brian Grant is a masterful Senior Analytics Consultant by day, and a Power BI legend by night. A passion for Power BI drove him to holistically master the tool from all three perspectives: M, DAX, and the visualization layer. Brian is a constant teacher who leads Power BI training sessions, while sharing his wealth of expertise through video and blogging resources.
Share on twitter
Share on facebook
Share on linkedin
Share on email


Subscribe to CSG. We’ll supply your inbox with the latest blog posts, training videos, and upcoming events.

Ready to wrangle your data?