Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I need a dax formula to know if a user is active if he bought the product id 2 in the last 3 months according to a date filter .
I want to create a measure to do that and mark the value '1' if he is or '0' if he is not.
Example:
Fact Sales IdSale IdProduct Date IdCustomer 1 1 18/06/2018 1 2 2 17/05/2018 1 3 1 12/05/2016 2 4 2 12/05/2016 2
DimCustomer
IdCustomer Name 1 Ana 2 Ted
DimProduct
IdProduct NameProduct 1 ProductB 2 ProductA
Ted would be evaluated marked as '1', because he bought the product 2 in 17/07/2018, and he is in the the last 3 months period.
If I would filter, I'd like to see the sum of all customers who was active, I mean: Customers who bought product 2 in the last 3 months according to my date filter
As per example, Ana only bought Product 2 in the recent past. Please check your data and post again for the solution.
Thanks
Raj
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 78 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |