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
tagban
Helper I
Helper I

Date within date range score

I have two tables, one has a date of when someone joined the team, the other has a rank (we use it for payments) but just a score value (single integer) with a start/end date for when that score is valid thru. I just need to display the valid rank for when the person joined. 

People Table: (Bear in mind people can have more than one join date (IE Leave and come back so their rank would change).

PersonID: 123545
JoinDate = mm/dd/yyyy

Score Table: 
Score = 2
ScoreStart = mm/dd/yyyy

ScoreEnd = mm/dd/yyyy


I had already tried a few tricks but so far not seeing success:
Creating a function:

 

 

 

= (JoinDate)=>
let
    Source = ScoreTable,
    Custom1 = Table.SelectRows(Source,each [ScoreStart] <= JoinDate and [ScoreEnd] >= JoinDate){0}[Score]
in
    Custom1

 

 

 


This seemed to work but when looking at results its showing a weird score. IE someone that clearly had 2 score, is showing as 5 or 8... 

1 REPLY 1
amitchandak
Super User
Super User

@tagban , refer to the HR analytics approach

 

Power BI: HR Analytics - Employees as on Date: https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

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
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.

Top Solution Authors