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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.