I am retrieviing a list of Direct Reports with the current user using Office365Users.DirectReports(User().Email) and saving it to a collection.
I also have a a SharePoint list that contains users data, "EmployeeTable".
Is there a way I can join sets of data? So if the user has 3 direct reports, it will show all 3 direct reports corresponding data from "EmployeeTable"
Thanks
Solved! Go to Solution.
Hi @itsmeqp,
You need to simulate a join operation on the two tables. This can be done in multiple ways, for example via unique join keys or duplicate join keys. Are there any duplicates in your Name column? Depending on this, and whether you care about duplicates or not, try the following:
1. Join with duplicate Names
gallery1.Items = AddColumns(Table1, "Region", LookUp(Table2, Name = Table1[@Name], Region))
2. Join with no duplicate Names (will produce nested data)
gallery1.Items = AddColumns(
GroupBy(Table1, "Name", "NameGroup"),
"Group",
AddColumns(NameGroup, "Region", LookUp(Table2, Name = NameGroup[@Name], Region)))
For your reference:
Regards,
Mona
Hi @itsmeqp,
You need to simulate a join operation on the two tables. This can be done in multiple ways, for example via unique join keys or duplicate join keys. Are there any duplicates in your Name column? Depending on this, and whether you care about duplicates or not, try the following:
1. Join with duplicate Names
gallery1.Items = AddColumns(Table1, "Region", LookUp(Table2, Name = Table1[@Name], Region))
2. Join with no duplicate Names (will produce nested data)
gallery1.Items = AddColumns(
GroupBy(Table1, "Name", "NameGroup"),
"Group",
AddColumns(NameGroup, "Region", LookUp(Table2, Name = NameGroup[@Name], Region)))
For your reference:
Regards,
Mona
Is the following one working with CDS data source? I tried it on my CDS data source and it is just returning empty column.
1. Join with duplicate Names
gallery1.Items = AddColumns(Table1, "Region", LookUp(Table2, Name = Table1[@Name], Region))
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
214 | |
205 | |
86 | |
58 | |
38 |
User | Count |
---|---|
322 | |
260 | |
130 | |
86 | |
55 |