You need to sign in to do that
Don't have an account?
Client Services
Get Multiple Report Rows using Analytics API
I am using the new analytics API to call a salesforce report. The report is of the matrix format and has a multiple columns, each with 2 rows of data. when calling the report using the new analytics API, only the first row of data is posted. Is there a way to get both rows of data? Below is the code that is pulling the data values:
function getData( jsonData ) { var chartData = new google.visualization.DataTable(); chartData.addColumn( "string", "Stage" ); $.each( jsonData.groupingsDown.groupings, function( index, values ) { chartData.addColumn( "number", values.label ); }); $.each( jsonData.groupingsAcross.groupings, function( columnIndex, columnValues ) { var values = []; values.push( columnValues.label ); $.each( jsonData.groupingsDown.groupings, function( rowIndex, rowValues ) { var cellIndex = rowValues.key + "!" + columnValues.key; values.push( jsonData.factMap[ cellIndex ].aggregates[ 0 ].value ); }); chartData.addRow(values); }); return chartData; }
KevinP
Can you publish the raw json it's retrieving ?