I think the simplest way to do this would just be to create a new data item such as "Department" with the values "TOTAL_HR" etc in it, it might even be a data item that already exists in your source data. Then you could simply add it as a dimension to your pivot table and it would be summed automatically in the manner you've described.
Alternatively you could create a calculated dimension, called "Department" or whatever is appropriate, with a definition like:
if(NAME = 'Raj' or NAME = 'Stella', 'TOTAL_HR',
if(NAME = 'Arjun', 'TOTAL_IT', 'TOTAL_ADMIN'))
But that approach would be horribly hard to maintain and pretty much useless with large or changing dimension values.
Apologies if I've misunderstood the point of your question.