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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Super User
Super User

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!:
Power BI Cookbook Third Edition (Color)

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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.