Thanks for your reply, if i use the formula you suggested it still doesnt work, i think its because the Position in the expression is caluclated using other calculated expressions from the pivot table/. I cannot write the whole formula since it is too long.
I just need to use the total of the column as a variable because i need to use it for calculation in another table/chart.
I think you have two basic mistakes in your expression. First, correct, you can't use [Position] if it is just a named expression in a chart. You have to recalculate it in your new expression. For simplicity, I'm going to assume your expression is If(Rand()>.5,'LONG','SHORT'), which obviously it isn't. Substitute your own expression of course. Second, when you aggr(), you need to tell it what dimensions you want to aggregate by, in this case, Group and Currency. So I think you want something like this: