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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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