Importance of types
The M language is a query language that is dynamically typed. What that means is that you don’t have to declare variables and their (data) types before you can use them. And, as you just learned, Power Query can recognize what kind of data it receives, but not being explicit about your data types is risky in data. When your column is labeled as type any, it signals that it can contain any value. When you then perform an operation that only works on a particular type of value, your operation may result in an error.
In this section, we’re going to explore why it’s better to be clear about your data types. Think of data types like labeling boxes when you move; it requires some attention when storing, but saves a lot of confusion later on. So, why are data types important?
Clarity and consistency
Data types have an important role in improving clarity and ensuring consistency within datasets. They do this by clearly signaling the nature...