Percentage of Grand Total in Row

TH123

New Member
Joined
Nov 15, 2022
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have data like below and I create pivot table accordingly. I want to add percentage as row directly as row#8 which I manually calculate in pivot table with logic: each column data multiple Grand total in column.
Thank you.



Data source
Book1
ABCD
1IssueItemQuantityDays Diff
2Late addedA10000
3Late addedB5007
4Late addedC20014
5Fab issueD40021
Sheet1


PIvot table
Book1
HIJKLMN
1Sum of QuantityDays Diff
2IssueItem071421Grand Total
3Fab issueD400400
4Late addedA10001000
5B500500
6C200200
7Grand Total10005002004002100
8%48%24%10%19%100%
Sheet1
Cell Formulas
RangeFormula
J8:N8J8=J7/$N$7
 
Oops - I should have realised that you will need to create a measure to use for the % of values. A simple measure like:

=SUM(Table1[Quantity])

should suffice. Then a dynamic MDX would look something like:

VBA Code:
{([Table1].[Issue].children,[Table1].[Item].children,[Measures].[Sum of Quantity]),([Table1].[Issue].[All],[Table1].[Item].[All],[Measures].[Sum of Quantity]),([Table1].[Issue].[All],[Table1].[Item].[All],[Measures].[TotQty])}

where TotQty is the name of the additional measure.
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,225,477
Messages
6,185,219
Members
453,283
Latest member
Shortm88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top