Hi, I am trying to segment customers by their number of visits per month(per unique daily visits) and have created a few categories such as “1”, “2-5”, “6-10”, “11-20” and “20+” etc. I’m wanting to determine how many of the visitors fall into each category to get a percentage of customers in each category. So a customer could come every day and would be “20+” and one that only only came 4 days would be a “2-5”.
I’ve created a measure which counts the number of times a customer visits in each month based on page filter(monthly) and on unique daily visits:
Visit_Player_Sum = sumx(
VALUES(‘Calendar’[Date]),
CALCULATE( DISTINCTCOUNT(
‘Player Transaction’[CustomerID]))
)
I’ve then created another measure to categorise these into the different buckets:
VisitsbyCustomerbyMonth =
SWITCH(
True(),
[Visit_Player_Sum]>0 && [Visit_Player_Sum]<2, “1”,
[Visit_Player_Sum]>1 && [Visit_Player_Sum]<6, “2-5”,
[Visit_Player_Sum]>5 && [Visit_Player_Sum]<11, “6-10”,
[Visit_Player_Sum]>10 && [Visit_Player_Sum]<16, “11-15”,
[Visit_Player_Sum]>15 && [Visit_Player_Sum]<21, “16-20”,
[Visit_Player_Sum]>20 , “21+”,
“NA”
)
When I create a table and show each customer ID and the number of visits per month per customer and the category of visit this captures it correctly. I’m wanting to show a pie/donut chart breakdown of the categories and their total number and percentage of total but I’m unable to figure this last step out. Any help would be appreciated.
Thanks