Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am having hard time assigning teams from an Employee reference table that has the employee name, their assign teams and date they join that time. I am using Lookupvalue to get the assign team and adding that to the sales table. But when I try to do this, a duplicate error shows up.
This is how the tables look:
This is how it should look(I use Sql to join the two tables):
Select S.*,
EmpRef.Team
From Sales as S
OUTER APPLY(
SELECT TOP 1 E.Team
FROM EmployeeRefernce as E
WHERE E.Employee = S.Employee
AND E.EffectiveDay <= S.CreateDay
ORDER BY E.EffectiveDay DESC) AS EmpRef
Please any assist or help is greatly appreciated.Thank you so much!
@Anonymous , Try a new colum like this sales
new column =
var _max = maxx( filter(Sales_Table, Sales_Table[Employee] = EmployeeRefernce [Employee] && EmployeeRefernce [EffectiveDay] <= Sales_Table[CreateDay] ),EmployeeRefernce[EffectiveDay] )
return
maxx( filter(Sales_Table, Sales_Table[Employee] = EmployeeRefernce[Employee] && EmployeeRefernce[EffectiveDay]= _max),EmployeeRefernce[Team] )
Hi amitchandak, thank you for looking into this. I am getting this error:
table of multiple values was supplied where a single value was expected.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |