From the course: Power BI Data Methods (2019)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding data types as custom M code

Adding data types as custom M code

From the course: Power BI Data Methods (2019)

Start my 1-month free trial

Adding data types as custom M code

- [Voiceover] We can add the data type as custom M code to the end of the function when adding a new collum to a table. Which translates to one fewer step in the query editor. On the screen, we see the functions for adding whole numbers, decimal numbers, dates, and text data types to the end of a new collum function, Which differs from converting data types in a separate step. In the Us Census power BI file, we duplicate the query for GI ID to counting web. We add example three to the end of the query, and right click and move to group custom M code examples. We click on this query to select it, if we go over to the state column we created using a conditional function we can change this into a text data type by clicking on the icon at the top and selecting "text." We've changed the data type but we also added a new applied step to our query editor. Instead of putting the data type changes in this separate step, we can add…

Contents