Almost ended within a social function, primarily (5,3)
I believe the answer is:
above all
'primarily' is the definition.
(thesaurus)
'almost ended within a social function' is the wordplay.
'almost' means to remove the last letter (most of the word but not all of it).
'ended' becomes 'over' ('over' can be a synonym of 'ended').
'within' indicates putting letters inside.
'social function' becomes 'ball' (I've seen this before).
'over' with its last letter taken away is 'ove'.
'a'+'ball'='aball'
'ove' inserted within 'aball' is 'ABOVE ALL'.
(Other definitions for above all that I've seen before include "Mainly" , "Hamlet : 'This . . . . . . . ., to thine own self be true'" , "What 18 [EVEREST] is" , "Notably" , "Especially" .)