Hello dear power apps community,
I'm having a problem with filtering 2 lists against each other. I've got a list 1, where I have employee data and a list 2 where I have department data. Then I've got a list 3, where I collect likes from users of list 1 to users from list 2.
List 1
| Employee data | Email |
| ... | (functions as ID) |
List 2
| department data | departmentID |
| ... | 1 to N |
List 3
| Employee Email | departmentID |
| xxx@example.com | 1 to N |
I want to make a filter that finds an random element from list 2, that are not liked from the active user (list 3).
My try was to Filter(List2; IsBlank(LookUp(List3; Employee Email=Office365Users.MyProfil().Mail && DepartmentID=List2.DepartmentID)
But this last part doesn't really work, since I can't reference the first filter inside the LookUp.
For randomization I actually got an algorithm:
First(SortByColumns(AddColumns(Filter(See above);"Random";Rand());"Random")
It would be really helpful If someone found an solution for this problem. Thanks in advance!