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.
These types of questions are far easier to answer if you can post some sample data and what your desired output is for that sample data. In general, I would not recommend trying to filter by individual cohort. In theory, you could use your current measure and simply create a table with cohort and that measure and your measure should be context filtered to give you a count of logins by cohort.
- sguenther10 years agoAdvocate II
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.
- Greg_Deckler10 years agoCommunity Champion
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?