How to Set the aggregate Values to Row field

image.png (11.7 KB)
PB.Power_Billing_Transactions_-_Billing_Summary-Member-YTD_Crosstab.zip (14.2 KB)

By default, the excel is adding the aggregate Values to the Column field but we need to move it to the Row filed.

@Mayank.Joshi,

Thanks for the template file and screenshot.

Well, you can move the aggregate (Values) field from Column fields section to Row fields section, see the sample code that works fine as I tested (the code is in .NET but you may convert to Java easily if required):
e.g
Sample code:

var wb = new Workbook("e:\\test2\\PB.Power_Billing_Transactions_-_Billing_Summary-Member-YTD_Crosstab.xlsx");
             PivotTable pivotTable = wb.Worksheets["PB.Power Billing Transactions"].PivotTables[0];
            pivotTable.AddFieldToArea(PivotFieldType.Row,pivotTable.ColumnFields[1]);

            wb.Save("e:\\test2\\out1.xlsx");

Hope, this helps a bit.