
Re: AVG calculation
Maria Carrasco Jun 2, 2014 1:45 PM (in response to Niranjan k)Try this
Avg(Aggr(sum(Dollars)/Count(standardID), Dimension))
Ale

Re: AVG calculation
Niranjan k Jun 2, 2014 2:03 PM (in response to Maria Carrasco)AVG Occupancy cost per person i want to calculate
i have only two dimension
how can i calculate this secnario
BEst Regards,
Niru

Re: AVG calculation
Henric Cronström Jun 2, 2014 2:10 PM (in response to Niranjan k)Then you should calculate total cost and divide by number of persons. Hence:
Sum(Dollars) / Count( distinct PersonID )
Aggr is not needed here.
HIC



Re: AVG calculation
Anand Chouhan Jun 2, 2014 2:53 PM (in response to Niranjan k)Updated the details now
Sorry i forget to add the dimension details
Check your output with the expected manual result if it gives result then it will correct other wise you can use Avg function for this. And if the fields which is in Numerator or denominator has proper relation then it will correct for you.
You can also try with
=Aggr( sum(Dollars)/Count(standardID), DimensionName )
Or
=Avg( Aggr( sum(Dollars)/Count(standardID), DimensionName ))

Re: AVG calculation
Henric Cronström Jun 2, 2014 2:46 PM (in response to Anand Chouhan )No, you cannot use Avg( Sum( ... ) ) without using an Aggr() function between the two aggregation functions. See more on Aggregations and Function Classes.
HIC


Re: AVG calculation
Eduardo Sommer Jun 2, 2014 1:47 PM (in response to Niranjan k)Hi,
21% is wrong. What your result means is an average of 21.49 Dollars per standardID.
Eduardo

Re: AVG calculation
Niranjan k Jun 2, 2014 1:53 PM (in response to Eduardo Sommer )Dear All,
AVG Occupancy cost per Person
=sum(Dollars)/Count(standardID)
=60663/2823
How can i calculate AVG of cost per person
Best regards,
Niranjan

Re: AVG calculation
Maria Carrasco Jun 2, 2014 1:59 PM (in response to Niranjan k)Avg(Aggr(sum(Dollars)/Count(standardID), Person))
Regards

Re: AVG calculation
Anand Chouhan Jun 2, 2014 2:04 PM (in response to Niranjan k)If you calculate this in any chart then use
Dimension: Person
Exper : =Avg( (sum(Dollars)/Count(standardID) ) )
And if calculate this in any text box then
=Avg(Aggr(sum(Dollars)/Count(standardID), Person))

Re: AVG calculation
Niranjan k Jun 2, 2014 2:17 PM (in response to Anand Chouhan )=avg(aggr(sum([Current Month Dollars])/Count(DISTINCT [Standard ID]),[Full Name])) result is =1014
=sum([Current Month Dollars])/Count(DISTINCT [Standard ID]) result is =21
which is the correct result ,which one should i follow (60663/2823 )
please guide me
Best Regards,
Niranjan

Re: AVG calculation
Anand Chouhan Jun 2, 2014 2:55 PM (in response to Niranjan k)Second one is seems right but without see the whole data not confirm you need to check from your side. Also as Henric suggest do not use Aggr and use PersonId in place of Standard ID but if the Personid has same Id as the Standard Id then use that.





Re: AVG calculation
Henric Cronström Jun 2, 2014 2:01 PM (in response to Niranjan k)It depends what you want to calculate. Dollars per standardID? Then Sum(Dollars)/Count(distinct standardID). Note the "distinct".
Or per something else? See more on Average – Which average?
HIC