Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CorneelMartensP
New Member

Analysing customer data

Hi! 

I have a dataset with the following tables (data is of grocery stores):

- sales (collumns of importance: date; customer id; receipt id; price; )
- customers (email, customer ID)
- receipts (ID; date)


I would like to be able to segment the customers in different groups of how active they are (>3 visits/week; >1 visit/week; >1 visit/month ...). In that way I would be able to compare basket size, revenue and so on for those types of customers.  A customer can change from a group, so it has to be time sensitive. I would like to calculate of each customer which type of customer they were on a certain date in the past (based on the average sales data two months prior to that certain date).
So I assume i have to create a measure; But when I do I can't use the different groups of customers as a legend. Nor can I do percentage calculations. If I generate a new collumn, than I only have the customers group that is valid right now. 
How should I solve this? 

This is my current measurement

 

TypeCustomer= 
   if(calculate(DISTINCTCOUNT('public sales_receipt'[id]), DATESINPERIOD(sale[datetime].[Date], 
max(sale[datetime]), -63, DAY))>27, "Frequent: >3/week", 
    if(calculate(DISTINCTCOUNT('public sales_receipt'[id]), DATESINPERIOD(sale[datetime].[Date], max(sale[datetime]), -63, DAY))>9, "ActiveClient: >1x/week", 
    if(calculate(DISTINCTCOUNT('public sales_receipt'[id]), DATESINPERIOD(sale[datetime].[Date], max(sale[datetime]), -63, DAY))>2, "SporadicClient: >1x/maand","")))

 

 
Thank you!

 

Corneel

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

I cannot visualise the sructure of your report.  Would you select a particular date in slicer and then see if for 10 weeks ended on that day, the buyer bought >3 times per week (average), > 1 time per week (average)?

Please clarify.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.