Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
HEllo everyone,
I have a simple problem I can't seem to figure out on my own.
I have a table of clients, with a column indicating the date of first purchase for a specific product line.
I have a date filter.
I want when i change the date filter, to evaluate on each line if the first purchase was in the time range selected in the filter, if so count 1 for that line, and sum the 1 to get a count of clients who made a purchase in that time range.
In SQL I would do that:
SUM(CASE WHEN date_first_purchase BETWEEN first_date AND last_date THEN 1 ELSE 0 END)
Is there a way to do that in DAX?
Thanks a lot!
I reread the documentation and achieved the desired results with a SUMX and CALCULATE with a little tweaking. Thanks anyway!
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!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |