Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
EvertonRamone
Helper I
Helper I

Check if user is active - DAX

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

2 REPLIES 2
Anonymous
Not applicable

Have you found a solution to your problem @EvertonRamone 

Anonymous
Not applicable

As per example, Ana only bought Product 2 in the recent past. Please check your data and post again for the solution.

 

Thanks

Raj

Helpful resources

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