- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Related lookup column with added time component
Hello,
I have a 'Consultant lookup' table which contains the names of Consultants, the Practice they are in, and the date from which they were in that team. Names are repeated due to promotions or moves between Practices...
I then have a 'Client meetings' table which shows the activity over a given period. My dilemma: In order for my slicers to work, I need to add a column to the 'Client meetings' table to include the name of the Practice that the Consultant was in at the time that the client meeting happened - based upon the [Date of meeting] column in the 'Client meetings' table and the 'Effective from date' in the [Consultant lookup] table. I know how to use the Related formula but I don't know how to account for the changing time-element.
Please can someone help? Dummy tables here:
CLIENT_MEETING_20240723070228_dummy.csv
Thank you
Quenril
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
Share a single PBI file with both tables loaded there. Why share 2 seperate Excel files?
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello Zhengdong,
This is so helpful and very, very close to what I need... in some instances the results includes multiple Practice names. Ideally I want only the Practice name which the Consultant is currently sat in... is there a way to remove the additional unecessariy information? I only want the last Practice information returned for each Consultant....
thank you
Quenril
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Quenril
What does it mean that the result contains multiple practice names, and does it mean that there are several practices in a cell?
Please provide screenshots or other forms of the instances where the results include multiple Practice names and the data that these rows refer to in the Consultant lookup and Client meetings tables.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Quenril
Please try this:
Here I add a calculated column in the 'Consultant lookup' table:
NextData =
VAR _NextData =
CALCULATE (
MIN ( 'Consultant lookup'[Effective from date] ),
FILTER (
ALLSELECTED ( 'Consultant lookup' ),
'Consultant lookup'[Consultant Name]
= EARLIER ( 'Consultant lookup'[Consultant Name] )
&& 'Consultant lookup'[Effective from date]
> EARLIER ( 'Consultant lookup'[Effective from date] )
)
)
RETURN
IF ( _NextData <> BLANK (), _NextData, TODAY () )
Then add a calculated column in the 'Client meetings' Table:
Column =
VAR _currentdate = 'Client meetings'[Date of Meeting]
VAR _currentConsultant = 'Client meetings'[Consultant Name]
VAR _vtable = FILTER(
CROSSJOIN(
SELECTCOLUMNS(
'Client meetings',
'Client meetings'[Date of Meeting],
'Client meetings'[Consultant Name]
),
SELECTCOLUMNS(
'Consultant lookup',
'Consultant lookup'[Practice],
'Consultant lookup'[Consultant Name],
'Consultant lookup'[Effective from date],
'Consultant lookup'[NextData]
)
),
'Client meetings'[Consultant Name] = 'Consultant lookup'[Consultant Name] && 'Client meetings'[Date of Meeting] >= 'Consultant lookup'[Effective from date] && 'Client meetings'[Date of Meeting] < 'Consultant lookup'[NextData]
)
RETURN
CONCATENATEX(
FILTER(
_vtable,
'Client meetings'[Date of Meeting] = _currentdate && 'Client meetings'[Consultant Name] = _currentConsultant
),
[Practice]
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-27-2024 03:16 PM | |||
06-27-2024 11:34 AM | |||
06-25-2018 04:22 AM | |||
05-30-2024 04:44 AM | |||
07-24-2024 04:56 AM |
User | Count |
---|---|
86 | |
81 | |
53 | |
37 | |
37 |