5 Replies Latest reply on Sep 26, 2013 5:49 AM by Antonio Willybiro

# Percentage calculation

hi -

I have a dimension called 'account' with multiple values:

• leavers
• ratio leavers to average headcount

I have this data by company:

• abc
• edf
• etc...

I am trying to show the ratio leavers to average headcount on a chart and use the 'country' filter to see the % info by country.

how should I best do this?

sum ([ratio leavers]): doesn't work

avg([ratio leavers]}: doesn't give an accurate picture

is it possible to do a calculated field that would be based on two values of the same dimension i.e. using leavers and 'average HC' whole numbers

I need something like ([value] for dimension of account = leavers) / ([value] for dimension of account = average headcount)

Thanks

Antonio

• ###### 1. Re: Percentage calculation

Antonio, Use table calculations Window_Sum or Window_Avg, I hope that will work!

• ###### 2. Re: Percentage calculation

It's hard to conceptualize this... can we get a screenshot?

Off the top of my head, I would say that something like:

would work. If this is not the case, it's likely you need to leverage table calculations... some combination of WINDOW_SUM, WINDOW_AVG, SUM, and AVG should do the trick.

• ###### 3. Re: Percentage calculation

here is a screenshot

and here is another one showing how the data is laid out on the source file

Thanks

Antonio

• ###### 4. Re: Percentage calculation

hi there - any other suggestions?

Thanks

Antonio

• ###### 5. Re: Percentage calculation

i managed to solved it

1. created a Set with just the value I needed from the dimension [account_name]
2. put that set on a table
3. applied the following table calculation: (ZN(SUM([Actual + QRF])) / LOOKUP(ZN(SUM([Actual + QRF])), LAST()))*-1
The -1 is because I have my leavers numbers as negative and I wanted to reverse that for the bar chart display.