2 Replies Latest reply on Jul 31, 2018 12:29 PM by Aniket Wagh

# Average of percentage

Hello Tableau Users,

I am trying to calculate average of percentage values.

I am getting below output as you see in below screenshot . However  I need average of percentage values,

Metric is calculated filed using below formula:

((SUM([Nb Active Users])) / LOOKUP((SUM([Nb Active Users])), FIRST())*100)

I tried window_avg but it din't work,

Please let me know if there is any other solution.

Regards,

Aniket

Output: Desired Result: • ###### 1. Re: Average of percentage

Hi Aniket,

create a calcaluted field

if size()=1

then

avg(measure)

else

sum(measure)

end

place it in text field and make sure that total is on. hope this helps if not could you please attach the workbook so that it will be helpful to others

If this answer helps kindly mark this answer as correct/helpful so that it will help others

BR,

NB

• ###### 2. Re: Average of percentage

Hello Naveen,

Thanks for suggestion.

I cannot apply average function on metric since I get error message "Argument to av is already aggregated and cannot be further aggregated.

My metric definition is

((SUM([Nb Active Users])) / LOOKUP((SUM([Nb Active Users])), FIRST())*100)

Regards,

Aniket