Problems adding a line to the end of the payroll report

Good Morning

I have a question, I am a little new to this part of ERPNEXT. but I create a payroll report and everything works fine for me but I would like to add a line before the total row that says subtotal by department. When I try it, it only adds it as a column next to the name or ID column and I need it at the end of the record. Is it possible to achieve this?