본문 바로가기
데이터 분석/시각화

[Tableau] 고객 세분화 관리를 위한 대시보드(1) - 고객 세분화 그룹 구하기(RFM)

2023. 1. 12.

지난번에 RFM 사용자 그룹 정의에 따라 SQL로 고객 세분화 그룹을 구했었는데 이번에는 동일한 작업을 태블로로 구현해보았다.

결과물

SQL로 고객 세분화 그룹 구하기▼

 

사용자 분석 - RFM 구하기

충성고객에게 혜택을 주는 이벤트를 기획 중입니다 구매금액이 큰 순서로 충성고객 리스트를 뽑아주세요 문제 정의하기 충성고객은 장기적이고 지속적인 관점에서 서비스 온보딩 여부(+사용자

hyeyun133.tistory.com


필요한 데이터

주문 데이터(+주문 상세 데이터), 유저 데이터

필드 생성

1) 기본 필드 연산하기

Number of Order: 주문수

COUNTD([Order No])

Max Order Date of the Year: 년도별 최신일자

{FIXED YEAR([Order Date]): MAX([Order Date])}

Sales: 매출액

[Quantity]*[Price]

2) RFM 정의하기

Recency: 유저별, 년도별 최근 주문일자-년도별 최신일자

DATEDIFF('day',{ FIXED [Mem No],YEAR([Order Date]): MAX([Order Date])},[Max Order Date of the Year])+1

Frequency: 유저별, 년도별 주문수

{ FIXED [Mem No],YEAR([Order Date]):[Number of Order]}

Monetary: 유저별, 년도별 구매액

{ FIXED [Mem No],YEAR([Order Date]): SUM([Sales])}

3) RFM 스코어 구하기

출처: 태블로로 하는 고객 세그멘테이션 (마케팅 RFM 분석)

Recency Score: Recency가 작을수록(백분율 상위) 높은 점수 부여

if [Recency] >= { FIXED YEAR([Order Date]): PERCENTILE([Recency],0.75)} then 1
ELSEIF [Recency] >= { FIXED YEAR([Order Date]): PERCENTILE([Recency],0.5)} then 2
ELSEIF [Recency] >= { FIXED YEAR([Order Date]): PERCENTILE([Recency],0.25)} then 3
else 4
end

Frequency Score: Frequency가 클수록(백분율 하위) 높은 점수 부여

if [Frequency] >= { FIXED YEAR([Order Date]): PERCENTILE([Frequency],0.75)} then 4
ELSEIF [Frequency] >= { FIXED YEAR([Order Date]): PERCENTILE([Frequency],0.5)} then 3
ELSEIF [Frequency] >= { FIXED YEAR([Order Date]): PERCENTILE([Frequency],0.25)} then 2
else 1
end

Monetary Score: Monetary가 클수록(백분율 하위) 높은 점수 부여

if [Monetary] >= { FIXED YEAR([Order Date]): PERCENTILE([Monetary],0.75)} then 4
ELSEIF [Monetary] >= { FIXED YEAR([Order Date]): PERCENTILE([Monetary],0.5)} then 3
ELSEIF [Monetary] >= { FIXED YEAR([Order Date]): PERCENTILE([Monetary],0.25)} then 2
else 1
end

RFM Score: RFM Score의 합

[Frequency Score] + [Monetary Score] + [Recency Score]

RFM: RFM Score를 문자열로 표현

STR([Recency Score]) +STR([Frequency Score]) + STR([Monetary Score])

4) 고객 유형화하기

출처: 태블로로 하는 고객 세그멘테이션 (마케팅 RFM 분석)

 

Customer Segment

if [Frequency Score]>= 4 and [Monetary Score]>= 4 and [Recency Score]>= 4 then 'VIP 고객'
ELSEIF [Recency Score]>=2 and [Recency Score]<=4 and [Frequency Score]>=3 and [Frequency Score]<=4 and [Monetary Score]>=4 then '충성 고객'
ELSEIF [Recency Score]>=3 and [Frequency Score]>=1 and [Frequency Score]<=3 and [Monetary Score]>=1 and [Monetary Score]<=3 then '잠재 충성 고객'
ELSEIF [Recency Score]>=4 and [Frequency Score]<2 and [Monetary Score]<2 then '신규 고객'
ELSEIF [Recency Score]>=3 and [Recency Score]<=4 and [Frequency Score]<2 and [Monetary Score]<2 then '잠재 고객'
ELSEIF [Recency Score]>=3 and [Recency Score]<=4 and [Frequency Score]>=3 and [Frequency Score]<=4 and [Monetary Score]>=3 and [Monetary Score]<=4 then '관심 필요 고객'
ELSEIF [Recency Score]>=2 and [Recency Score]<=3 and [Frequency Score]<3 and [Monetary Score]<3      then '잠드려는 고객'
ELSEIF [Recency Score]<3 and [Frequency Score]>=2 and [Frequency Score]<=4 and [Monetary Score]>=2 and [Monetary Score]<=4 then '이탈 우려 고객'
ELSEIF [Recency Score]<2 and [Frequency Score]>=4 and [Monetary Score]>=4  then '놓치면 안되는 고객'
ELSEIF [Recency Score]>=2 and [Recency Score]<=3 and [Frequency Score]>=2 and [Frequency Score]<=3 and [Monetary Score]>=2 and [Monetary Score]<=3 then '겨울잠 고객'
ELSEIF [Recency Score]<2 and [Frequency Score]<2 and [Monetary Score]<2  then '이탈 고객'
END

Tree Map 시각화

✔ Customer Segment는 색상으로 구분
Number of Order는 크기로 구분
Number of Order의 레이블은 구성 비율로 변경

RFM 고객 리스트

2021년도 구매 고객만 필터링

필터링

Mem No를 RFM Score 합계 기준으로 정렬

정렬

다음 단계로는 위와 같은 고객 세분화 그룹에 따른 고객 특성을 파악할 예정이다.


 

참고

 

태블로로 하는 고객 세그멘테이션 (마케팅 RFM 분석) - TABLEAU WIKI

오늘은 태블로에서 RFM 분석 기법을 활용하여 위 대시보드처럼 고객을 세그멘테이션 하는 방법을 알아보겠습니다. Customer Segmentation in Marketing Business Story 마케팅을 할 때 고객을 세분화해서 가치

tableauwiki.com

데이터 출처: SQL로 분석하고 Tableau로 시각화하자

댓글