So, this is a known issue.. because the delimiter for paramterized variable is comma, the comma you are using in your set analysis is seens as different arguments for the variable. I have seen marcus_sommer provide a solution for this, may be he can provide it yet again here as I don't really remember what he has suggested in the past
Sunny is right and the commas within the total-variable will be treated as parameter-delimiter. I think if you replaced the commas there maybe with '|' and then reversing it again by calling the $2 within the variable Scalenumber it could be bypassed.
Whereby the approach of such bypassing is quite ugly and error-prone and I wouldn't really suggest them else I would try to avoid these comma-issue completely. One way could be just not using such complex constructs in variables because the aim of the variables is to simplify the developer-life and not the opposite and therefore it could be the easier way just to use normal expressions.
Whereby if I think again a doubled $-sign expansion might be also working in this case. This meant the following call: