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
DataAnalyst7
Frequent Visitor

Calculating Remaining Active Joiners After Joining Month in Power BI

Description:

Hello Power BI Community,

I'm seeking help with creating a DAX measure in Power BI to calculate the number of remaining active joiners each month after their joining month. I have two main tables: JoinersSummary and NewJoinerAndLeavers, both connected to a Calender table.

Objective:

  • Determine the number of remaining active joiners in each subsequent month after they initially joined.

Data Structure:

  • JoinersSummary table contains columns: SimNo, IsNewJoiner, Merged (joining date in "yyyy-mm" format).
  • JoinerAndLeavers table contains columns: SimNo, Merged, ThreeMonthLeaver AND MORESample dataSample dataScreenshot 2024-07-10 113228.pngWhat I am trying to doWhat I am trying to do

Current Issue: I have created a measure to calculate remaining joiners, but it currently returns the same count as the new joiners, rather than the count of those who are still active after the joining month. The goal is to have a measure that correctly identifies and counts the remaining active joiners for each month.                                                                                                                                   

 

 

Remaining Joiners Optimized = 
VAR SelectedMonth = MAX('JoinersSummary'[Merged])
VAR JoinersInSelectedMonth = 
    CALCULATETABLE(
        VALUES('JoinersSummary'[SimNo]),
        'JoinersSummary'[IsNewJoiner] = 1,
        'JoinersSummary'[Merged] = SelectedMonth,
        REMOVEFILTERS('NewJoinerAndLeavers')
    )
VAR RemainingJoinersCount = 
    CALCULATE(
        DISTINCTCOUNT('NewJoinerAndLeavers'[SimNo]),
        'NewJoinerAndLeavers'[SimNo] IN JoinersInSelectedMonth,
        'NewJoinerAndLeavers'[Merged] > SelectedMonth,
        REMOVEFILTERS('Calender')
    )
RETURN
RemainingJoinersCount

 

 

This measure returns the same count as the new joiners count, not reflecting the actual number of joiners remaining active after the joining month.

Additional Information:

  • The JoinerSummary table . is made up of data from the NewJoinersandLeavers Table
  • The Merged column is in the "yyyy-mm" format as a Date type.

Request: I need guidance on correctly calculating the remaining active joiners for each subsequent month after their joining month. Any insights or suggestions would be greatly appreciated.

Thank you for your help!

2 REPLIES 2
Anonymous
Not applicable

Hi @DataAnalyst7 

 

It seems like the issue with your current DAX measure is that it's not accounting for leavers in the months following the joiners' initial month. Maybe you can try the following Dax:

 

Remaining Active Joiners = 
VAR SelectedMonth = MAX('JoinersSummary'[Merged])
VAR JoinersInSelectedMonth = 
    CALCULATETABLE(
        VALUES('JoinersSummary'[SimNo]),
        'JoinersSummary'[IsNewJoiner] = 1,
        'JoinersSummary'[Merged] = SelectedMonth
    )
VAR RemainingJoiners = 
    FILTER(
        JoinersInSelectedMonth,
        CALCULATE(
            COUNTROWS('NewJoinerAndLeavers'),
            'NewJoinerAndLeavers'[SimNo] = EARLIER('JoinersSummary'[SimNo]),
            'NewJoinerAndLeavers'[Merged] > SelectedMonth,
            'NewJoinerAndLeavers'[ThreeMonthLeaver] = 0
        ) > 0
    )
RETURN
COUNTROWS(RemainingJoiners)

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @Anonymous Thank you for the respone. The solution you gave still produce the correct number of joiners but not the remaining joiners.

Look at the image. 

Screenshot 2024-07-11 085042.png

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.