I have a SharePoint list named "ShiftAllowance1stLine" that captures employee shift allowances with the following columns:
Title (employee name)
ShiftAllowance_x002d_Day_x0028_N( Number)
ShiftAllowance_x002d_Night_x0028( Number)
ShiftAllowance_x002d_Evening_x00( Number)
ShiftAllowance_x002d_OnCall_x002( Number)
Numberofovertimehours( Number values will be in float i.e., 8.5)
Details_x0028_OT_x0029_ (multi-line text)
Month (text)
Employees can submit multiple entries throughout the month. On the 4th of every month, I want to run a flow that:
Filters all records from the previous month.
Groups the records by employee (Title).
Aggregates/sums the numeric fields per employee.
Concatenates the Details_x0028_OT_x0029_ text fields.
Creates a single combined report per employee.
Sends the final report (e.g., via email ).
I'm trying to implement this in Power Automate, but I'm struggling with the logic to:
Check if a user already exists in an array (to update their totals), or
Append a new user object if they don’t exist.
Any guidance or sample flows on how to build this kind of grouping and aggregation logic in Power Automate would be really appreciated.
Thank you!
Approximately how many records are there per month as this can impact how you will want to do this. What format do you want the report? Excel, CSV, something else? When you say aggregate, are you looking to produce something like this:
Employee
Allowance Day
Allowance Night
Allowance Evening
Allowance OnCall
Overtime Hours
Details
Month
John Doe
40
10
20
8
3
May
Mary Jane Doe
20
30
0
0
2
May
If so, what are the details? Does every entry have a different detail? If so, how do you envision aggregating this? The numeric values should be relatively easy to generate with variables.
Are all fields required? If not, that will cause some issues with the calculating of the variables to planning for null values will need to be made. Although, as a best practice, you should do this anyways.
If you are not looking for a report like above, please explain what you're looking for.
Finally, what is your experience level with Power Automate, as that will determine how much detail and effort needs to be taken to provide an answer. This can be done, but if you are a novice this is going to take a lot of explaining. And for not getting paid for providing answers, someone will need to be very motivated to go through what is required for a check that their response answered the question. If you are experienced and need a general outline and you are motivated to research further if you don't understand a step, it wouldn't be too tough to give you an outline.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.