How to get the total sum cost of a campaign that have the number 102 in it

277 views
Skip to first unread message

f.te...@wickey.de

unread,
Jul 23, 2018, 9:40:02 AM7/23/18
to AdWords API and Google Ads API Forum
Hallo,

How to i get the total sum from cost only of campagin number in the name say contains = 102 ..


But i get all the rows i only want to get one number without getting all the rows and then use select Sum()




Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jul 23, 2018, 4:32:45 PM7/23/18
to AdWords API and Google Ads API Forum
Hello, 

Are you trying to get the cost at an account level? If so, you could use Account Performance Report and then include AccountDescriptiveName and Cost to get the stats at the account level. You will be getting one row for the specific account. If you want the stats at the Campaign level, you will need to use the Campaign Performance Report. Please note that this report will contain number of rows equivalent to the campaigns that match the condition in your report definition. If you want to get the summary of the stats, you could set the skipReportSummary field to false and that should give you the sum where it is applicable. If this does not answer your question, could you please elaborate? 

Thanks,
Sreelakshmi, AdWords API Team
Message has been deleted

f.te...@wickey.de

unread,
Jul 24, 2018, 1:23:27 AM7/24/18
to AdWords API and Google Ads API Forum
Hallo,

skipReportSummary is the only thing i want to get in return... not rows+ reportsummary... but just only the reportsummary

Op maandag 23 juli 2018 22:32:45 UTC+2 schreef Sreelakshmi Sasidharan (AdWords API Team):

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jul 24, 2018, 2:02:36 PM7/24/18
to AdWords API and Google Ads API Forum
Hello, 

By default the reports will have the rows corresponding to the report definition. However, you can have just the summary printed out in your code. Please take a look at the StreamCriteriaReportResults.java sample in Java where total impressions are extracted and printed out after the report call without holding the entire file or results in the memory. You could try something similar to this example and just get the cost from your report call. Samples in other languages can also be found here

Please let me know if you have any further questions. 
Reply all
Reply to author
Forward
0 new messages