The variable is $sum but the variable name given on the command is $sumM. Any of these will work
Code:
${sum}M
"${sum}M"
"$sum"M
$sum'M'
"$sum"'M'
The forms in which $sum (or $sum}) are in double quotes are more a little more robust in case $sum does not contain the expected integer but a value including whitespace such as space.