Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Ritaf1983
Super User
Super User

Cohorts report dax

Hi,

In my table, I have the usage of accounts by service level and week.

IdWeekServiceOpen DateIs__Active

1

a0aaa01/01/20230
a0bbb01/01/20231
a0ccc01/01/20231
a1aaa01/01/20231
a1bbb01/01/20230
a1ccc01/01/20231
a2aaa01/01/20230
b0aaa01/01/20230
b0bbb01/01/20231
b0ccc01/01/20231
b1aaa01/01/20230
c0aaa08/01/20230
c0bbb08/01/20231
c0ccc08/01/20231
c1aaa08/01/20230
d0aaa10/01/20231
d0bbb10/01/20230
d0ccc10/01/20230
d1aaa10/01/20231
d1bbb10/01/20231
d1ccc10/01/20230
e0aaa17/01/20230
e0bbb17/01/20231
e0ccc17/01/20231

I need to do a cohort analysis.

The analysis involves calculating the number of active and inactive accounts on a weekly basis with a view that includes both the level of all services and the ability to filter by service.

I need assistance with two challenges in the calculation of inactive accounts:

1. Counting inactive accounts by week, so that an account is only counted if it was inactive in all services when no service selected on the slicer 

2. After accounts are closed, they disappear from the tracking in the following weeks, so I need a way to count them as inactive after they have been "deleted" (last week they appear which I have ).

The solution needs to be with DAX (the original report has millions of rows)
Link to the sample pbix  file with the model: https://drive.google.com/file/d/1Bb4BoLm3ZWvJXbAGYvgMozs67GI3uPTC/view?usp=sharing 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
0 REPLIES 0

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.