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! Learn more

Reply
MarlonPereira
Regular Visitor

Custom column to identify new customers

I have the following table: 

NameYear
Customer A2022
Customer A2021
Customer A2021
Customer B2022
Customer B2020
Customer C2021

 

What I want: for each row, identify if that customer is a new client (i.e. didn't have any entries on previous years). Expected output (using a custom column, don't know if there are better approaches):

 

NameYearNew?
Customer A2022No
Customer A2021Yes
Customer A2021Yes
Customer B2022No
Customer B2020Yes
Customer C2021Yes

 

I already tried COUNT and FILTER methods combined, without much success. Any sugestions?

 

Thanks!

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @MarlonPereira ,

 

Please try:

New? = 
var _a = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Name]=EARLIER('Table'[Name])&&[Year]<EARLIER('Table'[Year])))
return IF(_a>=1,"No","Yes")

Final output:

vjianbolimsft_0-1670375902168.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @MarlonPereira ,

 

Please try:

New? = 
var _a = CALCULATE(COUNT('Table'[Name]),FILTER('Table',[Name]=EARLIER('Table'[Name])&&[Year]<EARLIER('Table'[Year])))
return IF(_a>=1,"No","Yes")

Final output:

vjianbolimsft_0-1670375902168.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Perfect, my previous attempt didn't include the EARLIER function. Thank you!

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.