Forum Discussion
cohort analysis
- 7 years ago
Hi Anonymous,
Here I made one sample for your reference.
Enter the sampe data and create the measures as below.
countselected = IF(ISFILTERED(Table1[Product]),CALCULATE(DISTINCTCOUNT(Table1[Product]),ALLSELECTED(Table1)),BLANK())
Countproduct = IF(ISFILTERED(Table1[Product]),CALCULATE(DISTINCTCOUNT(Table1[Product]),ALLSELECTED(Table1[Product])),BLANK())
countall = CALCULATE(COUNT(Table1[customers]),FILTER(ALLSELECTED(Table1),[Countproduct]=[countselected]))
Measure 2 = IF([Countproduct]=[countselected],1,0)
Then we can create a table visual that make the visual is filterd by the Measure 2. You can refer to the result as the picture.
For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.
https://www.dropbox.com/s/k4v2urmz08forys/cohort%20analysis.pbix?dl=0
Regards,
Frank
Hi Anonymous,
Here I made one sample for your reference.
Enter the sampe data and create the measures as below.
countselected = IF(ISFILTERED(Table1[Product]),CALCULATE(DISTINCTCOUNT(Table1[Product]),ALLSELECTED(Table1)),BLANK())
Countproduct = IF(ISFILTERED(Table1[Product]),CALCULATE(DISTINCTCOUNT(Table1[Product]),ALLSELECTED(Table1[Product])),BLANK())
countall = CALCULATE(COUNT(Table1[customers]),FILTER(ALLSELECTED(Table1),[Countproduct]=[countselected]))
Measure 2 = IF([Countproduct]=[countselected],1,0)
Then we can create a table visual that make the visual is filterd by the Measure 2. You can refer to the result as the picture.
For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.
https://www.dropbox.com/s/k4v2urmz08forys/cohort%20analysis.pbix?dl=0
Regards,
Frank
Thank you i've tried that and it worked!