- 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
DAX Calculation find max value until certain date per employee (many-to-many)
Hello guys,
i have a problem that is driving me nuts and I am coming to you for help.
I have two tables:
- The first one details the working schedules per employee. It shows the schedule and the date it was submitted.
- The second one is an order table and it contains working orders, a date and the employee.
I would like to get two new columns in the second table specifying the employee schedule. I specify columns as I need to do further calculations and I need to visualize the date without the employee field displayed. Even though any idea is welcome.
Notice that both tables can have multiple times the same employee and the dates are not comparable!
Example:
Any recommendations? Thank you so much
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can do this in Power Query.
Starting with your 2 tables, go to your Order table and hit merge queries
Select your employee shift table to merge. Then select your keys (which will be Employee and date). Click Employee then hold ctrl and click date. It should put numbers next to your columns to show what order they're matching like this.
Hit okay and expand the shift table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
as a dax column can also be solved this way:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
as a dax column can also be solved this way:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can do this in Power Query.
Starting with your 2 tables, go to your Order table and hit merge queries
Select your employee shift table to merge. Then select your keys (which will be Employee and date). Click Employee then hold ctrl and click date. It should put numbers next to your columns to show what order they're matching like this.
Hit okay and expand the shift table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So far I've been able to find this thread but unsuccessfully implemented it as it doesn't filter by two conditions. Plus I would like to have it in columns rather than measures.

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 | |
---|---|---|---|
11-16-2023 07:55 PM | |||
05-29-2024 09:38 AM | |||
03-23-2023 03:45 AM | |||
09-20-2022 10:34 PM | |||
03-13-2023 01:06 PM |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
12 |