My source table in my Excel workbook is populated from a data connection which executes a stored procedure in SQL Server, and is refreshed every time the value in one of the cells that are the parameters for the data connection/stored procedure changes (columns delineated by semicolon):
trans type;month;category;sales;gross margin;ship days in month
Current;April,2014;Widgets;$5000;$2000,22
Current;April,2014;Forms;$5000;$2000,22
Current;April,2014;Brackets;$5000;$2000,22
Current;May,2014;Widgets;$5000;$2000,23
Current;May,2014;Forms;$5000;$2000,23
Current;May,2014;Brackets;$5000;$2000,23
Future;June,2014;Widgets;$5000;$2000,20
Future;June,2014;Forms;$5000;$2000,20
Future;June,2014;Brackets;$5000;$2000,20
Future;July,2014;Widgets;$5000;$2000,22
Future;July,2014;Forms;$5000;$2000,22
Future;July,2014;Brackets;$5000;$2000,22
In the pivot table built from this data table, the first three columns are the row labels, then the columns are sales, gross margin, gross margin percent (gm/sales), and daily sales (sales/ship days).
My problem is daily sales. At the root level, it works fine. But since calculated fields automatically assume the SUM of the fields involved, the math breaks down at the upper levels. It should be using the MAX (which is how I've set the column in the pivot table).
Other than sticking a "totals row" into the output (which would defeat the purpose of the pivot table), how do I make sure the Future/July,2014 row in the pivot table results in $15,000/22 as the daily sales?
trans type;month;category;sales;gross margin;ship days in month
Current;April,2014;Widgets;$5000;$2000,22
Current;April,2014;Forms;$5000;$2000,22
Current;April,2014;Brackets;$5000;$2000,22
Current;May,2014;Widgets;$5000;$2000,23
Current;May,2014;Forms;$5000;$2000,23
Current;May,2014;Brackets;$5000;$2000,23
Future;June,2014;Widgets;$5000;$2000,20
Future;June,2014;Forms;$5000;$2000,20
Future;June,2014;Brackets;$5000;$2000,20
Future;July,2014;Widgets;$5000;$2000,22
Future;July,2014;Forms;$5000;$2000,22
Future;July,2014;Brackets;$5000;$2000,22
In the pivot table built from this data table, the first three columns are the row labels, then the columns are sales, gross margin, gross margin percent (gm/sales), and daily sales (sales/ship days).
My problem is daily sales. At the root level, it works fine. But since calculated fields automatically assume the SUM of the fields involved, the math breaks down at the upper levels. It should be using the MAX (which is how I've set the column in the pivot table).
Other than sticking a "totals row" into the output (which would defeat the purpose of the pivot table), how do I make sure the Future/July,2014 row in the pivot table results in $15,000/22 as the daily sales?