Dashboard Mode - Removing duplicates
Goal
Find unique customers from sales data by removing duplicate entries to understand how many distinct customers made purchases.
Find unique customers from sales data by removing duplicate entries to understand how many distinct customers made purchases.
| OrderID | Customer | Product | Amount |
|---|---|---|---|
| 1001 | Alice | Notebook | 50 |
| 1002 | Bob | Pen | 5 |
| 1003 | Alice | Pen | 5 |
| 1004 | Charlie | Notebook | 50 |
| 1005 | Bob | Notebook | 50 |
| 1006 | Diana | Pen | 5 |
Unique Customers = DISTINCTCOUNT(Sales[Customer])Customer field on Rows. Power BI automatically shows unique values.SUM(Sales[Amount]) grouped by Customer+----------------------+----------------------+ | Unique Customers KPI | Unique Customer List | | (KPI) | (Matrix) | +----------------------+----------------------+ | Sales Amount by Customer (Bar Chart) | +----------------------------------------------------------+
Clicking a customer name in the Unique Customer List filters the Sales Amount by Customer bar chart to show only that customer's sales. The Unique Customers KPI remains the same as it counts all distinct customers in the data.
Add a filter for Customer = Bob. Which components update?
Sales in Power Query?Table.Distinct.Table.Distinct(Sales) removes duplicate rows from the Sales table.Customers with columns CustomerID and City, what will be the result of Table.Distinct(Customers, {"CustomerID"})?CustomerID, ignoring other columns.Table.Distinct(Sales, "ProductID") to remove duplicates by ProductID but get an error. What is the likely problem?Orders with columns OrderID, CustomerID, and OrderDate. You want to keep only the first order per customer by date, removing duplicates of CustomerID but keeping the earliest OrderDate. Which approach is best in Power Query?Table.Distinct(Orders, {"CustomerID"}) keeps the first row per customer, which is earliest due to sorting.Pass the test and this pattern moves unknown