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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rutgerboll
Frequent Visitor

Calculating Order Frequency by Customer

I am attempting to create a measure or series of measures that will allow me to do the following steps:

 

  1. Calculate time between each order placed by a customer
  2. Calculate the avg time between orders per customer
  3. 3) Break the data into quintiles

*Must retain the context of slicers/filters on the page

 

Currently I am doing this via a SQL query that returns a summary table with the quintiles already calculated.

 

I would like to do this in Power BI so I can filter the query without using parameters.

 

My data set includes the following tables

  1. FactLine (transaction lines)
  2. DimDate
  3. DimProduct (product details)
  4. DimCustomer

These tables are related to FactLine. How can I calculate the average order frequency by customer then break it out into quintiles? Thanks in advance for all help.

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @rutgerboll

Could you show the summary table with the quintiles already calculated for me to refer to?

 

As for some details, please confirm:

1.Calculate time between each order placed by a customer 

eg.

customer1     order   date

1                     1         2018/1/1

1                     2         2018/1/7

 

for customer1, time between each order =2018/1/7-2018/1/1=6 days, right?

 

2.Calculate the avg time between orders per customer

for customer1, avg time between orders=6days/2 orders=3, right?

 

3.Break the data into quintiles

???

 

Best Regards

Maggie

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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