Forum Discussion
timazarj
3 years agoHelper II
Customer Segmentation based on Total Sales using Numeric Parameter
Hi, I need to dynamically categorize the customer if they have a certain amount $ of sales. Customer Table Customer ID Customer name A AAA B BBB C CCC Line table Line...
Sahir_Maharaj
3 years agoSuper User
Hello timazarj,
To dynamically categorize customers based on their sales amount and show it in a matrix per sales bound and product:
1. Create a new table for the Sales Bound:
Sales Bound = GENERATESERIES(1000, 70000, 500)
2. Create a new measure for the Total Sales per Customer:
Total Sales = SUM(Line[Sales])
3. Create a new measure for the Sales Bound per Customer:
Sales Bound =
VAR CustomerSales = [Total Sales]
VAR VIPSalesBound = SELECTEDVALUE('Sales Bound'[Value])
RETURN
SWITCH(TRUE(),
CustomerSales >= VIPSalesBound, "Sales>= $" & FORMAT(VIPSalesBound, "#,##0"),
CustomerSales < VIPSalesBound, "Sales<$" & FORMAT(VIPSalesBound, "#,##0"))
4. Create a new matrix visual with fields:
- Rows: Sales Bound
- Columns: Product
- Values: Count of Customer ID or Total Sales (depending on your preference)
This will show the number of customers or total sales for each sales bound and product combination.
5. Add a slicer for the VIP Sales Bound parameter table to allow end-users to select the sales bound value.
With these steps, you should be able to dynamically categorize customers based on their sales amount and show it in a matrix per sales bound and product.
Let me know if this works for you.