Try a background color attribute expression from expression tab (open attributes by clicking on the plus sign next to your expression) instead of a visual cue to enter a color expression like
where yourLineExpression is calculating your table line values per dimension (essentially your current expression), and yourTotalExpression calculates the total value.