Hi @cpolito ,
Do you want to calculate the sum of hours per job per day, and the the sum of equipment he is attached to per job per day in a single collection?
Based on the needs that you mentioned, I think single one collection could achieve your needs. Please consider take a try with the following workaround (set the OnSelect property of a button to following formula) :
ClearColelct(
FinalResult,
AddColumns(
RenameColumns(
GroupBy(
Filter(
'Original Table',
crew_type = "EMP"
),
"job_id",
"tc_date",
"crew_id",
"GroupData"
),
"crew_id", "EMP_ID",
"job_id", "JOB_ID",
"tc_date", "Work_Date"
),
"TotalHour_EMP",
Sum(GroupData, hours),
"TotalHour_EQU",
Sum(
Filter(
'Original Table',
crew_type = "EQU",
attached_to = EMP_ID,
job_id = JOB_ID,
tc_date = Work_Date
),
hours
)
)
)
Please consider take a try with above solution, then TotalHour_Emp and TotalHour_EQU for each emp per job per day would be stored into the FinalResult collection.
You could then add a Data Table control in your app, set the Items property to the FinalResult collection, then enable desired fields (e.g. TotalHour_Emp, TotalHour_EQU, EMP_ID, ....) in this Data Table, then you could check TotalHour_Emp and TotalHour_EQU value for each emp per job per day in that Data Table.
Please take a try with above solution, check if the issue is solved.
Best regards,