Forum Discussion
Cohort Analysis
- 10 years ago
You could try:
Activity per Month cohort 1= CALCULATE(COUNTAX('activity'[login], 'activity'[cohort] = 1), AND((YEAR(Dates[Date]) = MAX(Dates[Year])) , (MONTH(Dates[Date]) = MAX(Dates[Month]))))
Might have an extra paren in there. Can't be sure unless I have some mock data to build a data model with and test.
Greg_Deckler: thx for the quick reply. Unfortunately I can't share my data here due to confidentiality reasons. But I could share a mockup of my data if needed. But actually this is just a DAX related question. I also think that I should be able to use my current measure, but I need to insert this additional filter correctly. And I just don't knwo how to do it in DAX. Basically what I need to do is to add a Filter which filters the argument of my COUNTA function.
You could try:
Activity per Month cohort 1= CALCULATE(COUNTAX('activity'[login], 'activity'[cohort] = 1), AND((YEAR(Dates[Date]) = MAX(Dates[Year])) , (MONTH(Dates[Date]) = MAX(Dates[Month]))))
Might have an extra paren in there. Can't be sure unless I have some mock data to build a data model with and test.
- GershwinMunich8 years agoRegular Visitor
i am also having issues on how to start with cohort analysis on power bi.
Greg, can you assist?