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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pjhuongleng
New Member

Calculate how many customer in a selected range get back to us

Hi Everyone, Im stuck with a case that I have a fact_sale table as below

order_dateorder_idproduct_idcustomer_id
10/07/2023534684280453983745405996117179117920571
10/07/2023534685368351583745395838037179162255675
17/07/2023535917284588383745356188757179014635835
17/07/2023535915203820383745360448597179014635835
15/08/2023545443050322783745405996117179117920571
15/08/202354544305032278374540042555717911792057
26/03/2024584022563257183745349307477179014635835
26/03/2024584022563257189510116396117179014635835
26/03/2024584022563257183745355861077179014635835
26/03/202458402256325718374535717179

7179014635835

 

Now I want to have a measure that calculate the unique customer in the selected period and how many of them repurchase the after the selected period

 

for example if I select July 2023 I will have 4 unique customer, so I want to know if any of these 4 customers get back to us after July 2023. For example the table I need is like this

Jul-23Aug-23Sep-23Oct-23Nov-23Dec-23Jan-24
4121101

If I select July-Sept 2023, it will calculate how many customer in these 3 months purcase with us and how many of them get back to to us from Oct-2023

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1712378563036.png

 


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

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1712378563036.png

 


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

your sample data doesn't match your expected result. 

 

I would go with a graphical solution - depending on how many customers you have.

 

lbendlin_0-1712362698212.png

 

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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