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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
tpoltorak
Helper I
Helper I

How to get the earliest date based on other columns

I have data in the following format and I am trying to identify when did every user have their earliest session, so that I can plot new starters for every month etc. What approach would you recommend please? DAX is a new thing for me. Thank you.

 

useridsession_countmonth_start
A10Jan-20
A11Feb-20
A11Mar-20
A22Jan-20
A21Feb-20
A20Mar-20
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @tpoltorak ,

 

Try to create a new column:

Column = MINX(FILTER('Table',EARLIER('Table'[userid])='Table'[userid]&&'Table'[session_count]>0),'Table'[month_start])

V-lianl-msft_0-1620108285195.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @tpoltorak ,

 

Try to create a new column:

Column = MINX(FILTER('Table',EARLIER('Table'[userid])='Table'[userid]&&'Table'[session_count]>0),'Table'[month_start])

V-lianl-msft_0-1620108285195.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@tpoltorak , based on what I got. Assuming month_start is a date

 

A new column
minx(filter(Table, [userid] =earlier([userId])),[month_start])

 

A new measure

minx(filter(allselected(Table), [userid] =max([userId])),[month_start])

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

I would like it as a column, but your code populates the whole column with the same earliest date. I need it to be earliest per user.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors