Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to do multiple subtotals in a Pivot table , Any help would be much appreciated.
What I need is as given below:
Please let me know if this is even possible with table properties or any other solution.
Thanks In Advance
Arpit
Hi,
First A+B needed to be define as a type dimension. in the SQL script.
To do that union all can be used.
First select statement for the table values. Second select statement is for the additional A+B values.
Ex:
In loader script or in the sql side.
Type:
LOADType,APR,MAY;
SQLSELECT Type , APR, MAYFROM dbo.TypeVal
UNION ALLSELECT 'A+B' AS Type , sum(APR) as APR , sum(MAY) as MAYFROM dbo.TypeVal WHERE Type in ('A','B');
After that, values can be sort by dimension in the editor side manually.
if(Type='A',1,
if(Type='B',2,
if(Type='A+B',3,
if(Type='C',4,
...
))))