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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors