5 Replies Latest reply: Mar 21, 2012 3:28 PM by Federico Levi

# Calculate Percent

Please to see the attachment. I show a list of days. Each day have a value, in front each value is the percent; The sum of all days is 2580 (Total_Value).

Example:

The value for Monday (Mon) is 300, then the percent is 11,6%. (300 / 2580 * 100)

The problem is: I have 2 List Box (one for Days and other for Values), if I select for example 'Mon', the Total isn't 2580, is 300, and the percent isn't 11,6%, is 100%. In the program I wrote the value 2580 in the script, but isn't the correct form.

How I can select Days or Values but the the Total_Value is always the sum of ALL values?

Thanks.

• ###### Calculate Percent

Change your 2580 in hard code in the Percent expression for Sum(Total TotCount)

• ###### Calculate Percent

Don't work. I change TotCount/2580*100 --> TotCount/Sum(Total TotCount)*100, but when I select any day, for example Wed (Value 150), then Sum(Total TotCount) is 150 instead of 2580.

• ###### Calculate Percent

I thought that the total was from the selection...

Then use

Sum({1}Total TotCount)

• ###### Re: Calculate Percent

Thank you !!! But can you explain me that means the {1} in the expression?

• ###### Calculate Percent

{1} is the total group.

When you use set analysis and dont want to use the filter you have selected, you use {1}.

The selected group is {\$} (also de default if you dont specify anything)