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
Anonymous
Not applicable

Return Value in New Column Based on Dates in Both Tables

Our system has one table for roles that an employee has held and another table for changes to their pay and/or full-time/part-time status.  I need to be able to return the role from Table A if it is between the dates in table B.

 

Table A lists all the different roles for each employee with a start and end date.  No role start and end dates will overlap.

 

Table B lists all the pay rate changes and status changes with a start date and end date.  No status start and dates will overlap.

 

It is likely that an employee will change pay rate and full-time/part-time status several times while holding the same role.

 

So, I need to create a column that returns the role the employee held between the start and end dates of table B.

 

For example, in the attached spreadsheet, I am trying to get the expected results column.

Lookup Question.PNG

 

Thanks!

Paul

 

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler ,

I thought I followed the example in the link you provided pretty closely?  What do I do wrong or need to do additionally?

 

Thanks

See the link in there about how to post your data, it is written by @ImkeF

Text data in a table, not pictures.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.

Users online (6,999)