Forum Discussion

mudria's avatar
mudria
New Member
2 years ago
Solved

DAX - Cumulative count for only active customer

Hi Community,

I need some help for a measure for cummulitive count over months - but only for the active customer in each month.

 

say,

Customer A purchased in Jan, Feb and March, it will be counted in Jan,Feb and March for cumulative. 

Customer B purchased in Jan and Feb only. It will be counted in Jan and Feb only - not in March.

Customer C comes in Feb and March, hence counted in Feb and March.

 

March should have count from Customer A ( Jan, Feb, March) + Customer C ( Feb and March). 

 

 

 

 

 I have tried usual cumulateive which gives me incorrect number ie 9 for March where is should be 7.

 

 

 

cumulative = CALCULATE([count_of_customers],FILTER(ALLSELECTED(Date_Table),Date_Table[Year Month Number]<=MAX(Date_Table[Year Month Number])))

 

Sample file attached in below post - Thanks to Ahmedx  for the file.

 

 Any help will be highly appreciated.

Regards

emudria.

26 Replies