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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
powerbiexpert22
Impactful Individual
Impactful Individual

repeat customers

i want to calculate repeat customers and show in below matrix, please see below the pbix file with sample data

repeat customers are those customers who follow below two criterias

critera:

1. customers who purchased more than 1 time in the same year, example , mike purchased 2 times in 2023

2. customers who purchased in consecutive year, example , david purchased in 2022 and 2023 as well so david is repeat customer

pbix file: https://drive.google.com/file/d/1XFqq6R1azA2YUn9lubKmZI1hv0nBU3-y/view?usp=drive_link

 

powerbiexpert22_1-1720367982462.png

 

2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

@powerbiexpert22 

This topic has been covered well by the SQLBI team.  Take a look at this article:
https://www.daxpatterns.com/new-and-returning-customers/

 

View solution in original post

ThxAlot
Super User
Super User

I don't waste too much delving into the spaghetti-like data model; but give you some hint. 

Interpret the criteria into DAX logics this way,

  1. find all customers in certain year from column/country from row;
  2. among all customers in step 1, find those who place at least 2 orders during the period of 2 years (certain year and previous year).

ThxAlot_0-1720434556523.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

I don't waste too much delving into the spaghetti-like data model; but give you some hint. 

Interpret the criteria into DAX logics this way,

  1. find all customers in certain year from column/country from row;
  2. among all customers in step 1, find those who place at least 2 orders during the period of 2 years (certain year and previous year).

ThxAlot_0-1720434556523.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



jdbuchanan71
Super User
Super User

@powerbiexpert22 

This topic has been covered well by the SQLBI team.  Take a look at this article:
https://www.daxpatterns.com/new-and-returning-customers/

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.