0
0
Power BIbi_tool~8 mins

Trim and clean text in Power BI - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Trim and clean text
Dashboard Goal

Show how to clean and trim customer names to remove extra spaces and unwanted characters for accurate reporting.

Sample Data
Customer IDRaw Customer NameSales Amount
1 Alice Smith 250
2Bob  Jones300
3 Charlie Brown 150
4David O'Connor400
5 Eve   Adams 350
6Frank Miller200
Dashboard Components
  • KPI Card: Total Sales
    Formula: Total Sales = SUM('SalesData'[Sales Amount])
    Result: 1650
  • Calculated Column: Clean Customer Name
    Formula: Clean Customer Name = TRIM('SalesData'[Raw Customer Name])
    Result examples:
    • "Alice Smith"
    • "Bob Jones"
    • "Charlie Brown"
    • "David O'Connor"
    • "Eve Adams"
    • "Frank Miller"
  • Table Visual: Cleaned Customer Names with Sales
    Columns: Customer ID, Clean Customer Name, Sales Amount
  • Bar Chart: Sales by Clean Customer Name
    X-axis: Clean Customer Name
    Y-axis: Sales Amount
Dashboard Layout
+----------------------+-----------------------+
|      Total Sales      |   Sales by Customer    |
|       (KPI Card)      |      (Bar Chart)       |
+----------------------+-----------------------+
|          Cleaned Customer Names Table           |
+-------------------------------------------------+
Interactivity

Clicking a customer name in the table or bar chart highlights that customer's sales and updates the Total Sales KPI to show only selected customer sales.

Filters can be applied on Clean Customer Name to focus on specific customers, updating all visuals accordingly.

Self Check

Add a filter to show only customers with sales above 300. Which components update and how?

  • Total Sales KPI: Updates to sum sales of filtered customers (e.g., David O'Connor 400 + Eve Adams 350 = 750)
  • Bar Chart: Shows bars only for customers with sales above 300
  • Cleaned Customer Names Table: Displays only customers meeting the sales filter
Key Result
Dashboard demonstrating cleaning and trimming customer names for accurate sales reporting.