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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
vengadesh_p
Helper I
Helper I

Need to create calculate Colum in DAX to segregate Old and new user

Hi All,

i have data like below table 
i need to create calculate colum in DAX to segregate Old and new user based on  "No of time used" colum 

Ex: A1 user jan/2021 he started to use facebook so he is new user for facebook on Jan/2021 after he is old user
same user started to use insta on may/2021 so he is new user for insta on May/2021 after he is old user

klm.png


Raw Data:

User IDMonth Start DateNo of time FB UsedNo of time Insta Used
A11-Jan-20215 
A11-Feb-20216 
A11-Mar-20213 
A11-Apr-20210 
A11-May-202143
A11-Jun-202125
A11-Jul-202116
A11-Aug-202112
A11-Sep-202153
A11-Oct-202131
A11-Nov-202162
A11-Dec-202126
A21-Jan-2021  
A21-Feb-2021 6
A21-Mar-202133
A21-Apr-202143
A21-May-202160
A21-Jun-202132
A21-Jul-202101
A21-Aug-202145
A21-Sep-202166
A21-Oct-202132
A21-Nov-202101
A21-Dec-202141
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vengadesh_p , create new columns like

 

New FB =
var _min = maxx(filter(Table, [User ID] = earlier([User ID]) && not(isblank([No of time FB]))),[Month Start Date])
return
if( [Month Start Date] =_min , "New", "Old")

 

New Insta =
var _min = maxx(filter(Table, [User ID] = earlier([User ID]) && not(isblank([No of time Insta Used]))),[Month Start Date])
return
if( [Month Start Date] =_min , "New", "Old")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@vengadesh_p , create new columns like

 

New FB =
var _min = maxx(filter(Table, [User ID] = earlier([User ID]) && not(isblank([No of time FB]))),[Month Start Date])
return
if( [Month Start Date] =_min , "New", "Old")

 

New Insta =
var _min = maxx(filter(Table, [User ID] = earlier([User ID]) && not(isblank([No of time Insta Used]))),[Month Start Date])
return
if( [Month Start Date] =_min , "New", "Old")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.