Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I have two tables shown below. I am looking to fill the "Eligible" column of Table1. There is a many to many relationship between the tables. I've been trying to accomplish this using the Lookupvalue function, but I have not been successful. Here are the requirements:
For each row in Table 1:
Table1
| Employee | Date | Eligible |
| John Smith | 12/25/2023 | Yes |
| John Smith | 12/28/2023 | No |
Table2
| Employee | Date |
| John Smith | 12/21/2023 |
| John Smith | 12/24/2023 |
| John Smith | 12/25/2023 |
Any ideas?
Thanks in advance.
@alagator28 Try this:
Eligible Column in Table1 =
VAR __Employee = 'Table1'[Employee]
VAR __Date = 'Table1'[Date]
VAR __Table = FILTER('Table2', [Employee] = __Employee && [Date] >= __Date)
VAR __Return = IF( __Table = BLANK(), "No", "Yes")
RETURN
__Return
Thank you @Greg_Deckler . Unfortunately, I'm getting the following error: The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
To troubleshoot this, I entered real values in the variables for __Employee and __Date and I still get the error. It seems to be coming from the __Table variable. I've made sure that the date format is exactly the same, as well as the matching Employee.
Any clues on what I should check? Thanks.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 11 | |
| 9 | |
| 5 | |
| 5 |