Questions tagged [sum]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
859 views

SOQL SUM() function not calculating the correct value

I have a SOQL query that I'm trying to use the SUM function with. My issue is that the SUM function gives me a totally different result than if i just query the rows and add up the amounts Query 1 - ...
1
vote
0answers
11 views

How to Include the Dollar Sign for a Sum in a Report

I've created a number of reports that sum up expenses by day and by type of expense. Each of the individual amounts show up with a dollar sign, however, the sum does not. The formula I used is: ...
0
votes
1answer
35 views

How to carry forward a certain Value of Record to the next record without an APEX code

I have an instance of an Object, which has the variables type = x, number_of_exams = 2, previous_no_of_exams = 0. In the next instance of the object, of the same type = x, I want the ...
0
votes
1answer
30 views

adding up custom field with triggar [duplicate]

trigger PaymentTrigger on Money_Received__c (after insert, after update, after delete) { Money_Received__c moneyReceived = [SELECT Reservation__c FROM Money_Received__c]; Reservation__c ...
0
votes
2answers
33 views

custom field formula

I have two custom objects. Reservation__c and MoneyReceived__c and they are lookup relationship. I want Reservation__c.totalReceived__c = sum of all MoneyReceived__c.amountReceived__c. There are one ...
0
votes
1answer
156 views

Sum up values(currency) from the list

Decimal totalReceived = 0.00; List<Money_Received__c> moneyReceived = [Select Amount_Received__c,Reservation__r.Total_Recieved__c from Money_Received__c where Id =: reservationId]; for(...
1
vote
1answer
1k views

Use SUM() and convertCurrency() together in a SOQL

I am trying to do something like this: List<object__c> testObject= [ SELECT SUM(convertCurrency(Amount__c))     FROM object__c ]; but it doesn't work. As far as I read in the Force.com ...