Have you heard of cost allocation on this basis in management accounts and how should it work? This is to allocate revenue to each business line
Cost Allocation: split 50% on headcount and 50% on revenue
Interpreting your question, you have incurred a large expense which you want to allocate to different departments based on number of employees and revenue of each department?
Is your question for accounting treatment or how to determine the value?
This is a scenario of class accounting. Most of the accounting software allow to create different dimensions like department, locations, branches, etc. You can always get Income statement and other financial reports by class, whatever you configure in the system.
With this, you debit the same account twice with different dimension value with respective amount for each dimension (department). Doing this, if you generate a normal income statement, it shows the total expense and if you generate an Income Statement by departments, you see revenue charged to the department by selecting the appropriate dimension and you see the allocated expenses too!
Let me know if this helps!