Data Cleaning Exercise Solution
Data Cleaning Exercise Solution
ORDER DATE
To move the column to be the 1st column in the dataset, simply select the
column, under Move option, click on To Beginning.
To extract the Month, select the column and first duplicate it by right-clicking on
it and selecting Duplicate Column.
Now, select the column, and under the Date option, Select Month and again
Month.
CUSTOMER ID
To prefix a ‘C’ select the column, under the Format option, select Add Prefix.
To convert into Proper Case, select the column, under the Format option, select
Capitalize Each Word.
COLOR
To convert the Proper case, follow the same method we just did.
PATTERN
To extract the first 2 characters, select the column, under the Extract Option,
select First Characters.
Then, put 2 and press OK.
You can now convert it to Upper Case the same way we did earlier.
SIZE
TOTAL
To add a TOTAL column, first under the Home tab, click on Close & Apply.
This will apply and finalize all the changes we made to the data.
You will see such a window when the changes are getting applied internally.
Total – this will be name of the new column that will be added
orders[Price] – you have pointed to the orders table in Power BI’s Price column
* – Multiplication sign
orders[Qty] – you have pointed to the orders table in Power BI’s Qty column
This will create a new column giving Total for each row of data.