# How to calculate a total of a parameter value in a visual

Hello,
Imagine a visual with :
date and brand as dimensions and
sum(sales) as value.
I’d like to add a calculation for each brand : sum(sales (of the reference brand (which is a parameter)).

(the difficulty is, for each brand, to “unselect” the dimension value and set a filter to the reference brand at the same time).

If you say sum({value}) and then just filter the brand to the parameter it will only show the brand that is that parameter’s value.

Is that what you’re looking for?

Hello,
in fact, I’d like to calculate something like this :

sum({value}) / sum({value “of a specific value of the dimension, the value is selected by user”})
(We called it a base-100 calculation).

To give you an example, suppose we have following data :
Brand;Value
A;500
B; 250
C;600

the aim is to calculate, if user select brand A :
A; 100
B; 50
C; 120

if user select Brand B :
A;200
B;100
C;240

etc …

the numerator is OK, difficulty is on denominator, I tried a lot of things (I can detail it, if needed) but I don’t manage to do it.

Do you have any idea ?

Regards