Questions tagged [sum]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Field don't get the correct value based of a trigger

I have a salesforce object which has the api name: Investissement_Materiel__c. This object contains the following fields: Id, Date__c, Investment__c, Amount__c, Total__c and Concept__c . The ...
laila19's user avatar
  • 21
0 votes
0 answers
80 views

Marketing Cloud Ampscript add and group by fields

Looking to add the Cost here and grouped by OrderId and purchaseNumber. I have the below but I think it is incorrect. I have other fields in the Data Extension but want the sum of cost aggregated by ...
Stewie's user avatar
  • 1
-1 votes
1 answer
504 views

How to sum values from a List of Double [closed]

I'm in need of help figuring out how to add values present in a list of Double. For example: List<Double> doubleList = new List<Double>({1.5, 2.2, 3.4, 4.8}); How do I add 1.5 + 2.2 + 3.4 +...
MoLim's user avatar
  • 1
2 votes
1 answer
520 views

SQL: How to get the right SUM of two different columns from two different data extensions into one new DE

I have the following tables: In the third table I want to combine these data with the SUM option in SQL so the total of clicks and Sends are in one field. Like this: I created the following query: ...
Martijn e's user avatar
  • 143
1 vote
2 answers
2k views

How to mimic roll-up summary in formula field

I have a custom object called jobs which are related to the master object accounts. Within the jobs object, I have a revenue field and an invoice_date field. On the accounts page layout, I want to ...
NMALM's user avatar
  • 171
-2 votes
1 answer
1k views

ERROR: 'Variable does not exist

I have a trigger bellow which calculates a sum of field in a related field in custom object . I am getting an error massage Variable does not exist:House_Improvements__c. Any ideas how can I resolve ...
Maria's user avatar
  • 3
1 vote
0 answers
26 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: ...
H. Kerr's user avatar
  • 33
0 votes
1 answer
130 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 ...
Niveth Kumar's user avatar
0 votes
1 answer
38 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 ...
Logan H's user avatar
  • 71
0 votes
2 answers
44 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 ...
Logan H's user avatar
  • 71
0 votes
1 answer
2k 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(...
Logan H's user avatar
  • 71
5 votes
1 answer
3k 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 - ...
denisoleary's user avatar
3 votes
1 answer
3k 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 ...
Arthlete's user avatar
  • 4,907