I have this query in AWQL and I get the response in CSV format using theReportUtils::DownloadReportWithAwql
select Date, Clicks, Cost from ACCOUNT_PERFORMANCE_REPORT during LAST_30_DAYSI need to convert the Cost data in the CSV from micros to the currency in the account (Cost / 1000000).
Also I need to be able to convert any the Cost data in the response using any AWQL query, for example the solution has to work for this query also:
SELECT CampaignName, KeywordText, Cost, CostPerConversion, QualityScore FROM KEYWORDS_PERFORMANCE_REPORT DURING LAST_7_DAYSAs of v201406, the returnMoneyInMicros header is no longer valid and values are always returned as micros.https://developers.google.com/adwords/api/docs/guides/reporting-concepts#money
I make the 2 query and the result are here now imagine you have cost1 in a $variable1 and cost2 in $variable2. how do I divide by 1000000 the Cost and Cost/conversion columns in the variables using the same function? in PHP