I have a table FactSales
And tried but didn’t get ant satisfactory result.
Id like to calculate old results and compare to my actual one and see how many customers whose bought product B before (before 90 days) didn’t buy the same product in last 3 months according to the date filter
I tried this:
Customers inactive = VAR Daysbefore90: Max(DimDate[date]) -90 > RETURN CALCULATE( DISTINCTCOUNT(FSales[CustomerKey]); DimProduct[Product] = “A”; FILTER( ALL ( DimDate[Date] );
DimDate[Date] < DaysBefore90 ); NOT(CONTAINS( FILTER(FSales; RELATED(DimDate[Date]) >= Daysbefore90 && DimDate[Date]) <= MAX(Daysbefore90): RELATED(DimProduct[Product]) = “A”) ; FSales[CustomerKey]; FSales[CustomerKey] ) ) )