grand total of a sub-column5

alex1alex

Board Regular
Joined
Sep 12, 2014
Messages
51
Hello,

This might be a straight pivot table question but posting here as my data is in Power Pivot.

I need to find the grand-total of a sub-column.
So, in the example XLS, (I just went and grabbed some census data) I would like to have the grand total of whites and blacks as the last right 2 columns of the pivot table.

Is this possible?

Thanks,
Alex


I'd like the pivot table to look like:

Sum of valueenrollmentwhiteORblack
Enrolled in grade 1Enrolled in grade 2Enrolled in grade 3
blackwhiteblackwhiteblackwhitetotal blacktotal white
Total17820399231867039107187554154655245120576

<tbody>
</tbody>

<tbody>
</tbody>



currently the pivot table fields look like:
COLUMNSVALUES
ENROLLMENTSum of POPULATION
whiteORblack

<tbody>
</tbody>



ENROLLMENTPOPULATIONwhiteORblack
Enrolled in grade 139,923white
Enrolled in grade 239,107white
Enrolled in grade 341,546white
Enrolled in grade 117,820black
Enrolled in grade 218,670black
Enrolled in grade 318,755black

<tbody>
</tbody>

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Tianbas

Board Regular
Joined
Apr 29, 2014
Messages
101
Why you want to have this strange format ? If you put whiteorblack in rows your table is much easier to read and you automatically get your subtotals.

If it has to be that kind of format for whatever reason you could create a measure for white and a measure for black that you can use instead of sum of population.
=CALCULATE(sum(Table1[POPULATION]),Table1[whiteORblack]="black")

Another solution could be create a set under options->field items and sets->create set based on column options.
 

alex1alex

Board Regular
Joined
Sep 12, 2014
Messages
51
Why the strange format? Because this is just an example file :) In my work file, the rows are populated with 2/3 other fields. I can't really move/delete them. Yeah?
Also, the main point of the file is to compare white vs black. (both by grade and total).

I actually already had that measure....where do i put it?

Where is this located? -> Another solution could be create a set under options->field items and sets->create set based on column options.
 

Forum statistics

Threads
1,089,394
Messages
5,407,994
Members
403,176
Latest member
mehtavish1

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top