
Re: Bar chart how to calculate a percentage
Jayden Fan Nov 7, 2016 3:38 PM (in response to Ian Hughes)You might want to use this expression:
SUM( dollar) / SUM(TOTAL dollar)
Make sure you have division in your dimension.

Re: Bar chart how to calculate a percentage
Sunny Talwar Nov 7, 2016 3:40 PM (in response to Ian Hughes)Would you be able to share a sample to show what you have?

Re: Bar chart how to calculate a percentage
Ian Hughes Nov 7, 2016 3:45 PM (in response to Sunny Talwar )Sure  What is the best way to share  some data is private


Re: Bar chart how to calculate a percentage
Vegar Lie Arntsen Nov 7, 2016 3:45 PM (in response to Ian Hughes)You probably want to put something like
sum(amount) /sum(total amount)
in an expression.

Re: Bar chart how to calculate a percentage
Ian Hughes Nov 7, 2016 3:58 PM (in response to Vegar Lie Arntsen )Yes definitely, what I am not sure about is how to get the total.
what I have is count(invoice#) to get a count of the number of invoices per division
what I am not sure about is where I can get the total count for the denominator? Should I do this in the load script and create a field called total_sales
If the count shows Shoes = 15, Coats = 20, socks = 17 so
Shoes should be 15/52*100 = 28.8%
Coats 20/52*100 = 38.4%
Socks 17/52*100 = 32.6%
Thanks
Ian

Re: Bar chart how to calculate a percentage
Sunny Talwar Nov 7, 2016 8:35 PM (in response to Ian Hughes)Count(TOTAL invoice#) as an expression should give you 52. So in order to get the percentage, you can use this
Count(invoice#)/Count(TOTAL invoice#)



Re: Bar chart how to calculate a percentage
pavan nallani Nov 7, 2016 10:29 PM (in response to Ian Hughes)It should work for u .=sum(amount) /sum(total amount)

Re: Bar chart how to calculate a percentage
Ian Hughes Nov 29, 2016 10:09 AM (in response to Ian Hughes)Thank you to all that replied , I was able to get what I needed.
Does anyone also know how to get the average of all and display on the title?
For example
We have a bar chart that shows time to close a ticket by ticket classification.
Class1 = 20 mins, Class2 = 90 mins, and class3 = 240 mins
I would like to show on the title the avg close time (20+90+240)/3 =116.6 mins
Thank you in advance
Ian

Re: Bar chart how to calculate a percentage
Sunny Talwar Nov 29, 2016 10:13 AM (in response to Ian Hughes)May be like this:
Avg(Aggr(YourExpression, YourDimension))
