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! Request now
So I have a table as follows:
| Customers | Days Since Purchased | Other Columns |
| Anya | 123 | - |
| Bob | 223 | - |
| Caroline | 6000 | - |
| Dally | 5732 | - |
| Anya | 4511 |
I want to find the COUNT of CUSTOMERS who have purchased within the ast 2000 days (and in this table see, for example Anya has purchased reently as wel as several days earlier, we would like to keep only Anya's recent purchase and hence the COUNT should return 2 (since Dally and Caroline have purchased > 2000 days before).
Sample Data: Download Excel File
Thanks!
Solved! Go to Solution.
@Anonymous , Try a measure like
countx(filter(summarize(Table, Table[Customers], "_1", min(Table[Days Since Purchased])),[_1]>2000),[Customers])
Please stop using SUMMARIZE for anything else but grouping and do not recommend it to others, especially those that are not very familiar with the quirks of DAX. This function is "broken" and there are much better alternatives. If you want to know why, please read this: https://www.sqlbi.com/articles/all-the-secrets-of-summarize/
Thanks.
@Anonymous , Try a measure like
countx(filter(summarize(Table, Table[Customers], "_1", min(Table[Days Since Purchased])),[_1]>2000),[Customers])
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!