Incorrect Totals and SubTotals in Power Pivot Table when dividing

Daniel4050

New Member
Joined
Oct 21, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I am new to the forum and to power pivot in general.
I'm having a problem with the totals of the pivot tables that are added to the Power Pivot data model, specifically when it comes to a column that does a division

This error only occurs when I work with data that is in the power pivot data model, because when I use current data from an excel table, the totals in the division column are correct. I am attaching images of the situation

These images correspond to two tables that handle exactly the same data source, the only difference is that the second one takes the data from the power Pivot model, and the first one from an excel table.

1. Pivot Table, Data from Excel Table (Correct Totals)
1666376937542.png

2. Pivot Table, Data from Power pivot data model (Wrong Totals)
1666376912410.png

The table obtains data of several products with a unique SKU code, products that have a sale in liters and an individual budget in liters as well, in addition these products are associated to a Logistics center, therefore it is possible to filter and visualize the sales and compliance by Logistics center.

For the sales compliance column, the operation performed is a division of the sales in liters over the sales budget in liters. (Sales/Sales Budget = % Sales Compliance)

What the power pivot table does, is that it performs the division for the data of each Product (Sales/Budget) and then adds all the values obtained in subtotals and Grand Total, The correct thing to do (and what the excel pivot table does) is to add up the total sales of all products and then divide by the total budget of all products.

The same error occurs for the coverage column, which divides the inventory by the budget in liters.

Anybody has the same problem? any idea how to solve it? I would appreciate it a lot!
 

Attachments

  • 1666376517487.png
    1666376517487.png
    17.2 KB · Views: 13
  • 1666376602147.png
    1666376602147.png
    17.2 KB · Views: 13
  • 1666376625424.png
    1666376625424.png
    16.1 KB · Views: 15

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Your granularity or scope of the base calculation is wrong.
It appears you may have created an additional field/column in your PowerQuery instead of creating an appropriate measure. You must understand Row and Filter context as well as the iteration for any measure.
I would view some of Mike Girvins Data Analysis class on YouTube (ExcelIsFun) or maybe some of the shorts from Guy-In-A-Cube.
 
Upvote 0
Solution
You were absolutely right! Doing some research in the sources you told me about, I found a solution to the problem. I was not aware of the measure functionality. Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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