Book Image

Data Cleaning with Power BI

By : Gus Frazer
Book Image

Data Cleaning with Power BI

By: Gus Frazer

Overview of this book

Microsoft Power BI offers a range of powerful data cleaning and preparation options through tools such as DAX, Power Query, and the M language. However, despite its user-friendly interface, mastering it can be challenging. Whether you're a seasoned analyst or a novice exploring the potential of Power BI, this comprehensive guide equips you with techniques to transform raw data into a reliable foundation for insightful analysis and visualization. This book serves as a comprehensive guide to data cleaning, starting with data quality, common data challenges, and best practices for handling data. You’ll learn how to import and clean data with Query Editor and transform data using the M query language. As you advance, you’ll explore Power BI’s data modeling capabilities for efficient cleaning and establishing relationships. Later chapters cover best practices for using Power Automate for data cleaning and task automation. Finally, you’ll discover how OpenAI and ChatGPT can make data cleaning in Power BI easier. By the end of the book, you will have a comprehensive understanding of data cleaning concepts, techniques, and how to use Power BI and its tools for effective data preparation.
Table of Contents (23 chapters)
Free Chapter
1
Part 1 – Introduction and Fundamentals
6
Part 2 – Data Import and Query Editor
11
Part 3 – Advanced Data Cleaning and Optimizations
16
Part 4 – Paginated Reports, Automations, and OpenAI

Merging columns

Just like the previous scenario, there are often situations where you need to merge columns to achieve the desired format. For example, depending how date data is stored, you may need to merge the [Day], [Month], and [Year] columns to achieve a singular Date column. In the following figure, we can see an example description and configuration of how you might do this using the prebuilt function of Merge Columns in Power Query:

Figure 4.12 – The drop-down menu above the Merge Columns function (left) and a close-up of the UI for the Merge Columns function (right)

Figure 4.12 – The drop-down menu above the Merge Columns function (left) and a close-up of the UI for the Merge Columns function (right)

To use the Merge Columns function, follow these steps:

  1. Select the columns you would like to merge.
  2. Select the Merge Columns function, which can be located on the Home or Transform tab in the ribbon toolbar.
  3. In the Merge Columns configuration window, you can select a separator to sit between the merged values. As we are working with dates, we can select Custom...