Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have the following table:
| Name | Year |
| Customer A | 2022 |
| Customer A | 2021 |
| Customer A | 2021 |
| Customer B | 2022 |
| Customer B | 2020 |
| Customer C | 2021 |
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):
| Name | Year | New? |
| Customer A | 2022 | No |
| Customer A | 2021 | Yes |
| Customer A | 2021 | Yes |
| Customer B | 2022 | No |
| Customer B | 2020 | Yes |
| Customer C | 2021 | Yes |
I already tried COUNT and FILTER methods combined, without much success. Any sugestions?
Thanks!
Solved! Go to Solution.
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:
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.
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:
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!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |