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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
atul9063
Helper III
Helper III

Calculate Retain Customer

Hi,

 

I want help in calculating retained users :

 

Output 

monthCount of retain Users
Jan4
Feb2
Mar3

 

Dataset 

DateUseritemid 
1/1/20181
1/2/20182
1/3/20183
1/4/20186
2/10/20181
2/11/20183
2/12/201810
2/13/20183
2/14/20181
2/15/201811
3/15/20181
3/16/20182
3/17/20183
3/18/201810
3/19/201814
1 ACCEPTED SOLUTION

@atul9063

 

See file attached as well

 

retention.png


Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@atul9063

 

try this

 

Create a calendar table and then this MEASURE

 

Measure =
VAR PreviousMonthUsers =
    CALCULATETABLE (
        DISTINCT ( Table1[Useritemid ] ),
        PREVIOUSMONTH ( Table1[Date] )
    )
VAR CurrentMonthUsers =
    DISTINCT ( Table1[Useritemid ] )
RETURN
    IF (
        ISEMPTY ( PreviousMonthUsers ),
        COUNTROWS ( CurrentMonthUsers ),
        COUNTROWS ( INTERSECT ( PreviousMonthUsers, CurrentMonthUsers ) )
    )

Regards
Zubair

Please try my custom visuals

@atul9063

 

See file attached as well

 

retention.png


Regards
Zubair

Please try my custom visuals

@Zubair_MuhammadThanks for quick response 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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