Question

Group Column from Salesforce report in Excel as middleware

  • 3 March 2023
  • 1 reply
  • 89 views

Badge +1

Hi

I export a Salesforce report into excel and i am trying to Group the data by one column in order to dynamically create a chart in my final word Document.

Each Product may have more than 1 pack size. So when the report gets exported the three is three records with sales of each pack size.

I only want to see the sum total of the three ?

Any ideas how i can achieve this?


Stephen


1 reply

Badge +1

Hi Stephen,

My recommendation would be to use a SOQL query in your DocGen package instead of a Salesforce report. Your report type might be the cause of the segregation of data into 3 rows versus 1 consolidated row. If you use a direct SOQL query, you could just query the product directly or potentially perform an aggregate of the 3 pack sizes in the SOQL query itself. This way, there is no need to aggregate in excel. The rest would work the same as what you are trying to do. Here is an article of how to perform aggregates in SOQL.

 

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_agg_fns.htm

 

https://help.nintex.com/en-US/docgen/docservices/#docgen-sfdc/Services/manageDDP/RelationshipSOQLQuery.htm?Highlight=soql

 

Best,

Ray C

Reply