-
Book Overview & Buying
-
Table Of Contents
Data Cleaning with Power BI
By :
As highlighted earlier in this book, M, the language behind Power Query, offers a rich library of native functions designed for data transformation. Leveraging these functions can often be more efficient than custom code.
For instance, let’s say you need to standardize product names by converting them to title case. Instead of writing custom code, you can utilize the Text.ToTitleCase function, making your query more concise and performant.
Here is an example of doing just this:
let
Source = ... // Your data source
StandardizedData = Table.TransformColumns(Source, {"ProductName", Text.ToTitleCase})
in
StandardizedData
In this code, we use the Table.TransformColumns function along with the Text.ToTitleCase function to standardize product names. Native functions are highly optimized for their specific tasks, resulting in more efficient and faster queries.
The...