How to add percentage at the end of Pivot Table

Manojlo

New Member
Joined
Sep 4, 2020
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is there any option to add calculated field in column "E" with formula to divide values from Grand Total column "D" with Closed column "B", in order to calculate Closed Rate =SUM(B/D)?
I inserted yellow column manually for example what I want to achieved.


1707319023813.png
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Bring your data into Power Pivot and build your Pivot Table there. Create a measure to divide the closed by the total. If you post a sample raw data using XL2BB instead of a picture of your PT, then maybe someone will do the calculation for you. Cannot manipulate data in a picture and you only provided the expected result and not the raw data.
 
Upvote 0
Thank you, I have problem to use XL2BB, I try with picture...

1707726568632.png
 
Upvote 0
1. I imported your file to Power Query Editor.
2. In the editor
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    FormatDate = Table.TransformColumnTypes(Source,{{"Reported M/Y", type date}}),
    ClosedCount = Table.AddColumn(FormatDate, "Closed", each if [#"Close/Open"] = "CLOSED" then 1 else null),
    OpenCount = Table.AddColumn(ClosedCount, "Open", each if [#"Close/Open"]= "OPEN" then 1 else null),
    RemovedColumn = Table.RemoveColumns(OpenCount,{"Close/Open"})
in
    RemovedColumn

3. Closed and Loaded to the Data Model (Power Pivot)
4. In Power Pivot I created Pivot that resembled your expected results before percentage
5. In Power Pivot I created the following measure for Totals
Excel Formula:
=CALCULATE(SUMX(Table1,Table1[Count of Closed]+Table1[Count of Open]))
6. In Power Pivot I created the following measure for percentage
Excel Formula:
=CALCULATE(DIVIDE([Count of Closed],Table1[Total]))
7. Formatted the percentage in the Pivot Table

Note: both measures are in DAX

PowerPivotPct (version 2).xlsb
ABCDEFGHIJK
1TitleReported IncidentReported M/YClose/OpenRow LabelsCount of OpenCount of ClosedTotalPct Closed
2Title 1123-NovCLOSED1/24/202413475.00%
3Title 2124-FebCLOSED2/24/202411100.00%
4Title 3124-JanOPEN11/23/202411100.00%
5Title 4124-JanCLOSEDGrand Total15683.33%
6Title 5124-JanCLOSED
7Title 6124-JanCLOSED
Sheet1
 
Upvote 0
1. I imported your file to Power Query Editor.
2. In the editor
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    FormatDate = Table.TransformColumnTypes(Source,{{"Reported M/Y", type date}}),
    ClosedCount = Table.AddColumn(FormatDate, "Closed", each if [#"Close/Open"] = "CLOSED" then 1 else null),
    OpenCount = Table.AddColumn(ClosedCount, "Open", each if [#"Close/Open"]= "OPEN" then 1 else null),
    RemovedColumn = Table.RemoveColumns(OpenCount,{"Close/Open"})
in
    RemovedColumn

3. Closed and Loaded to the Data Model (Power Pivot)
4. In Power Pivot I created Pivot that resembled your expected results before percentage
5. In Power Pivot I created the following measure for Totals
Excel Formula:
=CALCULATE(SUMX(Table1,Table1[Count of Closed]+Table1[Count of Open]))
6. In Power Pivot I created the following measure for percentage
Excel Formula:
=CALCULATE(DIVIDE([Count of Closed],Table1[Total]))
7. Formatted the percentage in the Pivot Table

Note: both measures are in DAX

PowerPivotPct (version 2).xlsb
ABCDEFGHIJK
1TitleReported IncidentReported M/YClose/OpenRow LabelsCount of OpenCount of ClosedTotalPct Closed
2Title 1123-NovCLOSED1/24/202413475.00%
3Title 2124-FebCLOSED2/24/202411100.00%
4Title 3124-JanOPEN11/23/202411100.00%
5Title 4124-JanCLOSEDGrand Total15683.33%
6Title 5124-JanCLOSED
7Title 6124-JanCLOSED
Sheet1

Thank you very much!
Could you upload a file here?
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

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