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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DanaElaine
Frequent Visitor

Net Member Count measure help, please!

Goal: Generate a measure with Net Member Count by date. I need to provide net member count by month for the last three years.

 

Relevant tables: 

  1. Members: This contains one row per member for every year they are a member. If a member joined in 2021 and is still a meber in 2024, they have four rows (one for year year). Columns include MemberID, Join Date, and Year.
  2. Date Table: Columns include (among others), Date and Year.

Relationships: 

  1. 'Date Table'[Year] - 'Members'[Year] (Many to many, inactive)
  2. 'Date Table'[Date] - 'Members'[Join Date] (one to many, inactive)

 

Thought process: I've decided to break this measure into two parts and sum the results. 

  1. Members who joined this year
  2. Members who are members during the year but joined in a previous year

My YTD New Members measure: 

YTD New Members =
CALCULATE(
    TOTALYTD(
        DISTINCTCOUNT('Members'[MemberID]), 'Date Table'[Date]),
        USERELATIONSHIP('Members'[Join Date], 'Date Table'[Date])
)
 
My members who are members that year but joined in a previous year table: 

Members who joined before current year =

SUMMARIZE('Members',

    'Members'[Year],

    "Mem Count",

    CALCULATE(

        DISTINCTCOUNT('Members'[MemberID]),

        YEAR('Members'[Join Date]) < 'Members'[Year]

    )

)

The second part is where I start getting stuck. I have a table created using SUMMARIZE (see above) that provides the count of appropriate members, but I'm stuck on how to use that as a temp table in the measure and even on how to reference it in a measure if I create the table separately. If I create the table separately, then I still need to nest the column in some function, and using MAX() passes the max value, irrespective of the year. 
 
This is the closest I've gotten, but I'm missing something (possibly obvious). Please help!
 
Net Members =
// New mems this year
CALCULATE(
    TOTALYTD(DISTINCTCOUNT('Members'[MemberID]), 'Date Table'[Date]),
    USERELATIONSHIP('Date Table'[Date], 'Members'[Join Date])
)
+
// Mems who joined in previous year but are still mems this year
CALCULATE(
    MAX('Members who joined before current year'[Mem Count]),
    USERELATIONSHIP('Members who joined before current year'[Year], 'Date Table'[Year])
)
 
The way this is written, it sums the correct year's new member count with the max number of non-new members (which happens to be this year). So the outcome is only correct for the current year. 
2 REPLIES 2
danextian
Super User
Super User

Hi @DanaElaine 

 

Please post a workable sample data (not an image), your expected result from that and the reasoning behind. You may post a link to an Excel file or a sanitized copy of your pbix stored in the cloud. https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447... 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian , thanks. Here's a sample of sanitized data: Sanitized Data.xlsx 

 

I included three sheets: A selection of sanitized data with the relavent columns, my expected results, and a third sheet I called "Intermediary Steps" where I attempted to illustrate the steps I've taken so far. 

 

Thanks again!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.