function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TilluTillu 

Need to calculate Median for a field?

I have a report in that having Age field , i want to calculate  Median of this Age field. i know the formule to calculate median  (n+1)/2 . but i should need to do in ascending order before calculating...
that means  

if  5 7 3 4 8  then i have to re arrange this as 3 4 5 7 8  then i can calculate median . but on report how should i create formulae for this. please need sollution.
 
when i am trying to create a formulae it asking for SUM or MIN or MAX of Age field....then how should i calculate this. please need help
MarcPannenberg.ax1843MarcPannenberg.ax1843

I can not think of a way to do this in salesforce.com reports, at all. Have you considered exporting the data into excel and using the MEDIAN function there? The only pure salesforce.com alternative I can think of would be apex code. Depending on your use case that might be overkill.

AgiAgi

Hi,

 

Have you tried with a Custom summary formula, Grand summary only ?

(Age__c:SUM+1)/2  

 

Best Regards,

Agi