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
tzaveri
New Member

Count ex-members (TIN) based on MembershipEndDate

Looking to get count of ex-members (using their TIN in TIN column) from last 24 months based on MembershipEndDate.

 

tzaveri_0-1694028157827.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tzaveri,

Here is the measure formula that can get rolling 2 year records and get distinct member count, you can try it if it suitable for your requirement.

formula =
VAR currDate =
    MAX ( Table1[MembershipEndDate] )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table1[TIN] ) ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [MembershipEndDate]
                >= DATE ( YEAR ( currDate ) - 2, MONTH ( currDate ), DAY ( currDate )
                    && [MembershipEndDate] <= currDate )
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @tzaveri,

Here is the measure formula that can get rolling 2 year records and get distinct member count, you can try it if it suitable for your requirement.

formula =
VAR currDate =
    MAX ( Table1[MembershipEndDate] )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table1[TIN] ) ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [MembershipEndDate]
                >= DATE ( YEAR ( currDate ) - 2, MONTH ( currDate ), DAY ( currDate )
                    && [MembershipEndDate] <= currDate )
        )
    )

Regards,

Xiaoxin Sheng

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.