0
0
Power BIbi_tool~15 mins

Trim and clean text in Power BI - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a data analyst at a retail company.
📋 Request: Your manager wants you to prepare a clean customer feedback report by removing extra spaces and unwanted characters from the feedback text.
📊 Data: You have a table with customer feedback entries. Each entry contains a CustomerID and a FeedbackText column. The FeedbackText has inconsistent spacing and some unwanted line breaks or tabs.
🎯 Deliverable: Create a Power BI report that shows the cleaned feedback text for each customer.
Progress0 / 3 steps
Sample Data
CustomerIDFeedbackText
101 Great product!
102Fast delivery and good service.
103 Loved it Will buy again.
104Not satisfied with the quality.
105Excellent!
106 Could be better.
107 Good value for money.
108 Average experience.
1
Step 1: Load the customer feedback data into Power BI.
Use 'Get Data' to import the table with CustomerID and FeedbackText columns.
Expected Result
Data table with raw feedback text loaded into Power BI.
2
Step 2: Create a new calculated column to clean the FeedbackText by removing extra spaces and unwanted characters.
CleanedFeedback = TRIM(CLEAN('Table'[FeedbackText]))
Expected Result
A new column 'CleanedFeedback' with feedback text trimmed of extra spaces and cleaned of line breaks and tabs.
3
Step 3: Create a table visual in the report showing CustomerID and the cleaned feedback text.
Add a Table visual with fields: CustomerID, CleanedFeedback
Expected Result
Report table displays each CustomerID with their cleaned feedback text, free of extra spaces and unwanted characters.
Final Result
Customer Feedback Report

+------------+------------------------------+
| CustomerID | CleanedFeedback               |
+------------+------------------------------+
| 101        | Great product!                |
| 102        | Fast delivery and good service. |
| 103        | Loved it Will buy again.      |
| 104        | Not satisfied with the quality. |
| 105        | Excellent!                   |
| 106        | Could be better.             |
| 107        | Good value for money.        |
| 108        | Average experience.          |
+------------+------------------------------+
The cleaning process removed extra spaces, tabs, and line breaks from feedback text.
Cleaned feedback is easier to read and analyze for sentiment or trends.
Consistent text formatting improves report professionalism and usability.
Bonus Challenge

Create a measure that counts how many feedback entries contain the word 'good' after cleaning the text.

Show Hint
Use a DAX measure with SEARCH or CONTAINSSTRING on the CleanedFeedback column.