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
ISV
New Member

Regular customers

Hello,

I cant understand how to find regular customers.
- there are lines with orders within 5 years

- there are email and phone numbers in these orders

How to understand which customers are regular? For example, created repeated sales by year.

Thank you for help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

To find out if a customer is regular, I'd create a column in your customer table and use an if statement to check if they have any orders in the last 5 years.  For my example i'm going to say "5 orders in the last 5 years is regular"

 

IsRegular = IF(
	Calculate(
		count('Invoices'[InvoiceID]),
		all('Invoices'),
		'Invoices'[CustomerID] = 'Customers'[CustomerID],
		DateDiff('Invoices'[Date], Today(), YEAR) <= 5
	) >= 5,
	TRUE(),
	FALSE()
)

(i've assumed some table names and fields)

 

 

From here, if you wanted their names and phone numbers you can do up a matrix of the Invoice table filtering out where IsRegular = False. Then you could set the Date filter to be in the last 5 years.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

To find out if a customer is regular, I'd create a column in your customer table and use an if statement to check if they have any orders in the last 5 years.  For my example i'm going to say "5 orders in the last 5 years is regular"

 

IsRegular = IF(
	Calculate(
		count('Invoices'[InvoiceID]),
		all('Invoices'),
		'Invoices'[CustomerID] = 'Customers'[CustomerID],
		DateDiff('Invoices'[Date], Today(), YEAR) <= 5
	) >= 5,
	TRUE(),
	FALSE()
)

(i've assumed some table names and fields)

 

 

From here, if you wanted their names and phone numbers you can do up a matrix of the Invoice table filtering out where IsRegular = False. Then you could set the Date filter to be in the last 5 years.

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.