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
Muhammed SultanMuhammed Sultan 

Formula Help Needed...?

Hello,

i have a field labeled 'hours logged'
this field is calculated using this formula: 

IF( NOT(AND(ISBLANK(End_Date_Time__c), ISBLANK(Start_Date_Time__c))), (End_Date_Time__c - Start_Date_Time__c)*24, 0.0)

However, I would like to create a formula to work out the total hours logged.
i have noticed on a salesforce report, it provides 'sum of hours logged' - this is exactly what i want, but in a formula that i can use to populate fields.

Please review the images below:

(hours logged)
 User-added image
sum of hours logged - from a report

User-added image
salesforce report, uses a formula to works this out, i want that formula, is possible?
Any assistance would be greatly appreciated. 
AhmadNawaz212AhmadNawaz212
Hello Muhammed,

You have one field called 'Hours Logged'. Do you want to save Total Hours logged(mean sum of all hours logged entries)?

-Ahmad Nawaz
Muhammed SultanMuhammed Sultan

@Ahmad thank you for your response,
yes, so we have one formula field called 'hours logged' on the 'journal' object, each journal record has a candidate assigned to the journal record, this 'hours logged field', takes the certain dates from candidates record and uses those to work out the 'hours logged field'.

BUT i would like a field called 'Total hours logged', that displays all the combined hours logged for that candidate.

AhmadNawaz212AhmadNawaz212
@Muhammed
For Total Hours Logged: You have to pass two dates and you can calculate that. I don't know which fields you have in 'Candidates'. If you can attach a screenshot of all fields in Candidates then I can make a formula for you.
Muhammed SultanMuhammed Sultan

@Ahmad

User-added image

please confirm what object i should select? and i will provide all the fields within the object selected.
could you explain why are we want the 'candidates' fields? im a bit confused, as 'journal' is the object.