Hi Everyone
I have the below database and i want to to put it in a gallery that each section of this gallery has the name of the Department and the unique sum of the employee of each Department
Table1: to get the name of each department into the gallery using ThisItem
THDepartment | THBudgetId |
Marketing | B |
Technology | C |
Accounting | E |
HR | H |
this to get the calculations
EmpID | THDepartment | THBudgetId |
553 | Care | C |
226 | Technology | C |
779 | Care | C |
553 | Care | C |
226 | Technology | C |
2210 | Care | C |
553 | Care | C |
Hi @SaeedKamel ,
Try the below, however the output of GroupBy is limited by Delegation, so it may not give you the totals you need.
AddColumns(
GroupBy(
YourListName,
"THDepartment",
"THBudgetID",
"OtherData"
),
"EmpID",
CountRows(OtherData)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
HI @SaeedKamel ,
Where did you put that code - as the Items of a Gallery, it will show the number of unique records with the combination of THDepartment and THBudgetID. and is valid code for this (I also just tested it here).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@WarrenBelz I am trying to add the code in the Spent Filed to calculate the unique values
The code I gave you is for the Items of your Gallery and should produce (with the field names you requested) the results you displayed as required.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
207 | |
98 | |
60 | |
55 | |
52 |
User | Count |
---|---|
257 | |
161 | |
87 | |
79 | |
68 |