Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Cleaning with Power BI

You're reading from  Data Cleaning with Power BI

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781805126409
Pages 340 pages
Edition 1st Edition
Languages
Author (1):
Gus Frazer Gus Frazer
Profile icon Gus Frazer

Table of Contents (23) Chapters

Preface Part 1 – Introduction and Fundamentals
Chapter 1: Introduction to Power BI Data Cleaning Chapter 2: Understanding Data Quality and Why Data Cleaning is Important Chapter 3: Data Cleaning Fundamentals and Principles Chapter 4: The Most Common Data Cleaning Operations Part 2 – Data Import and Query Editor
Chapter 5: Importing Data into Power BI Chapter 6: Cleaning Data with Query Editor Chapter 7: Transforming Data with the M Language Chapter 8: Using Data Profiling for Exploratory Data Analysis (EDA) Part 3 – Advanced Data Cleaning and Optimizations
Chapter 9: Advanced Data Cleaning Techniques Chapter 10: Creating Custom Functions in Power Query Chapter 11: M Query Optimization Chapter 12: Data Modeling and Managing Relationships Part 4 – Paginated Reports, Automations, and OpenAI
Chapter 13: Preparing Data for Paginated Reporting Chapter 14: Automating Data Cleaning Tasks with Power Automate Chapter 15: Making Life Easier with OpenAI Assessments Index Other Books You May Enjoy

Transforming data with M

Now, there are a plethora of transformation functions that can be used within Advanced Editor to transform your data. With the issue/error we faced when trying to apply the filter, there are a certain number of functions we will need to use, such as Table.TransformColumns and Table.RemoveLastN.

As mentioned earlier, the first issue we can see in the data that might prevent us from filtering is that the values for cost and price contain a $ character. This is leading Power BI to read this as a text value. So our first port of call should be to remove this value from the column.

Now, of course, you could use the Split column function in the Power Query UI but it’s important to understand what M code is created behind the scenes from using such buttons. Using M will also help reduce the steps you need to get to the desired goal. This will particularly help when you’re looking to script more complex queries in M later in your data journey.

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}