Prompt
Answer
Customer Segmentation Formulas in DAX
This guide provides a set of DAX formulas for different customer segmentation strategies. Each formula is explained clearly with a practical example to illustrate its use.
Segmentation by Total Sales
Formula
Customer Sales Segment =
SWITCH(
TRUE(),
[Total Sales] < 500, "Low Value",
[Total Sales] >= 500 && [Total Sales] < 2000, "Medium Value",
[Total Sales] >= 2000, "High Value"
)
Explanation
- Syntax:
SWITCH(TRUE(), ..., ...)
evaluates multiple conditions and segments customers based on their total sales. - Logic:
- Customers with total sales < 500 are categorized as "Low Value".
- Customers with total sales >= 500 and < 2000 as "Medium Value".
- Customers with total sales >= 2000 as "High Value".
Practical Example
If a customer has a total sales amount of 1500, the segment would be "Medium Value".
Segmentation by Purchase Frequency
Formula
Customer Purchase Frequency Segment =
SWITCH(
TRUE(),
[Total Purchases] < 5, "Infrequent",
[Total Purchases] >= 5 && [Total Purchases] < 15, "Regular",
[Total Purchases] >= 15, "Frequent"
)
Explanation
- Syntax:
SWITCH(TRUE(), ..., ...)
- Logic:
- Customers with total purchases < 5 are categorized as "Infrequent".
- Customers with total purchases >= 5 and < 15 as "Regular".
- Customers with total purchases >= 15 as "Frequent".
Practical Example
A customer making 10 purchases would fall into the "Regular" segment.
Segmentation by Recency of Purchase
Formula
Customer Recency Segment =
SWITCH(
TRUE(),
[Last Purchase Date] <= TODAY() - 365, "Dormant",
[Last Purchase Date] <= TODAY() - 180, "Inactive",
[Last Purchase Date] > TODAY() - 180, "Active"
)
Explanation
- Syntax:
SWITCH(TRUE(), ..., ...)
along withTODAY()
- Logic:
- "Dormant" for customers whose last purchase was more than 365 days ago.
- "Inactive" for those whose last purchase was more than 180 days but less than 365 days ago.
- "Active" for purchases within the last 180 days.
Practical Example
If a customer's last purchase was 200 days ago, he/she would be segmented as "Inactive".
Segmentation by Revenue Growth
Formula
Customer Growth Segment =
SWITCH(
TRUE(),
[Revenue Growth] < 0, "Declining",
[Revenue Growth] >= 0 && [Revenue Growth] < 10, "Stable",
[Revenue Growth] >= 10, "Growing"
)
Explanation
- Syntax:
SWITCH(TRUE(), ..., ...)
- Logic:
- "Declining" for customers with negative growth.
- "Stable" for growth between 0% and 10%.
- "Growing" for growth above 10%.
Practical Example
A customer with a revenue growth of 5% would be categorized as "Stable".
Focus on User Comprehension
To enhance your understanding and capability in using DAX, consider exploring courses through the Enterprise DNA Platform. These courses cover a range of topics from beginner to advanced levels in DAX, offering practical and real-world data analysis problem-solving techniques.
Conclusion
These DAX formulas provide a concise and efficient way to segment customers based on various criteria such as total sales, purchase frequency, recency of purchase, and revenue growth. Proper segmentation enables better-targeted marketing strategies and improved customer relationship management.
Description
This guide presents DAX formulas for segmenting customers by total sales, purchase frequency, recency of purchase, and revenue growth, complete with explanations and practical examples for effective data analysis.