0% found this document useful (0 votes)
28 views9 pages

Data Cleaning Exercise Solution

Uploaded by

irina.uncul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views9 pages

Data Cleaning Exercise Solution

Uploaded by

irina.uncul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ORDER ID

To split a column, based on a delimiter (a character which divides the content),

• Select the column


• Under the Transform tab, click on Split column -> By
delimiter

• Enter a – in the box and press enter


• You can even explore the other options apart from custom if your delimiter
is not a –

• Data is now split into 2 columns


• Simply rename the columns by double-clicking on the header
• Or if you want to delete the column with the T’s, you can simply select the
column, right-click and delete it.

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.

The duplicate will be created at the end of the dataset.

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.

Put a ‘C’ and press OK.


SLEEVE LENGTH

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.

To Trim the data, under Format option, just click on Trim.

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

Convert to upper-case exactly in the same way we have been doing.

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.

Now, go to the Data View, then Modelling Tab.

Under that, click on New Column.

Enter the below formula.

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.

You might also like