VAM but only average of time climbing

Hello, Garmin have a field called (average ascent/hour) that counts the Vam while you climb only.Is possible to make a field that show the same, or a VAM that only counts while you climb?

Should be possible with a Custom Activity field but you will need to provide the conditions of what is to be considered climbing.