To use the SUM() function in a calculated dimension you should tell QlikView how to sum it, because at the dimension level it doesn't understand how you want to group the sum.
If, for example, you have a first dimension of Country, then State, and you now want to add a sum() of salesvalue as a dimension, you should do the following:
=Aggr(Sum(SalesValue),Country,State)
This way, QlikView knows what you want a sum of.....