There is related topic how to get logged hours on specific issue type and subtasks with calculated measure: