Forum Discussion
EvertonRamone
8 years agoHelper 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
- AnonymousNot 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
- AnonymousNot applicable
Have you found a solution to your problem EvertonRamone