Group rooms by Department and return the totals to a parameter of each room

Hi everyone, I’m really new in this Dynamo world and I’m not able to finish my first routine…
I have differents rooms with their Corresponding areas and Departments.
I’d like to have a new parameter in each room in which I could see the Total Area of the Department.

I’m collecting the rooms, getting their parameters, grouping… but now I don´t know how to transfer those totals to each rooms.

Thanks for your help (and patience)

(I know I can do a Schedule in which I’m able to group by departments… but I really like to have that data in the instance parameter)

Below is an example of what you’re trying to accomplish.

you can do it like this

Thanks so much. This graph with the Python script worked perfectly!
Could I have a filter by Design Option?
The final sum of the data includes all the Options that I’m working with.
Thanks again.

Thanks for your help!

I tried this graph but the result wasn’t the one that I needed.
The I tried the other option in the blog and that was perfect for my purpose.