Need help on Power Pivot Measures

spycein

Board Regular
Joined
Mar 8, 2014
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hello Every one,

I have created a power pivot report based on the following tables

Table No.1

[TABLE="width: 440"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Product Name[/TD]
[TD]Group[/TD]
[/TR]
[TR]
[TD]Laptop[/TD]
[TD]Electronic[/TD]
[/TR]
[TR]
[TD]Television[/TD]
[TD]Electronic[/TD]
[/TR]
[TR]
[TD]Washing Machines[/TD]
[TD]Electronic[/TD]
[/TR]
[TR]
[TD]Refrigerator[/TD]
[TD]Electronic[/TD]
[/TR]
[TR]
[TD]Mobile Phones[/TD]
[TD]Electronic[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table No.2

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product Name[/TD]
[TD]Target[/TD]
[/TR]
[TR]
[TD]Laptop[/TD]
[TD] 100,000.00[/TD]
[/TR]
[TR]
[TD]Television[/TD]
[TD] 80,000.00[/TD]
[/TR]
[TR]
[TD]Washing Machines[/TD]
[TD] 70,000.00[/TD]
[/TR]
[TR]
[TD]Refrigerator[/TD]
[TD] 70,000.00[/TD]
[/TR]
[TR]
[TD]Mobile Phones[/TD]
[TD] 150,000.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table No.3

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product Name[/TD]
[TD]Forecast Sale[/TD]
[/TR]
[TR]
[TD]Laptop[/TD]
[TD] 100,000.00[/TD]
[/TR]
[TR]
[TD]Television[/TD]
[TD] 80,000.00[/TD]
[/TR]
[TR]
[TD]Washing Machines[/TD]
[TD] 70,000.00[/TD]
[/TR]
[TR]
[TD]Refrigerator[/TD]
[TD] 70,000.00[/TD]
[/TR]
[TR]
[TD]Mobile Phones[/TD]
[TD] 150,000.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Table No.4

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Product Name[/TD]
[TD]Sold[/TD]
[/TR]
[TR]
[TD]Laptop[/TD]
[TD] 90,000.00[/TD]
[/TR]
[TR]
[TD]Television[/TD]
[TD] 75,000.00[/TD]
[/TR]
[TR]
[TD]Washing Machines[/TD]
[TD] 80,000.00[/TD]
[/TR]
[TR]
[TD]Refrigerator[/TD]
[TD] 65,000.00[/TD]
[/TR]
[TR]
[TD]Mobile Phones[/TD]
[TD] 125,000.00[/TD]
[/TR]
</tbody>[/TABLE]

My Power Pivot report looks like this

[TABLE="width: 728"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD] Target[/TD]
[TD] Total Sold[/TD]
[TD] Forecast Sale[/TD]
[TD] Variance[/TD]
[/TR]
[TR]
[TD]Electronics (Sub-Total)[/TD]
[TD="align: right"]470,000.00[/TD]
[TD="align: right"]435,000.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]35,000.00[/TD]
[/TR]
[TR]
[TD]Laptop[/TD]
[TD="align: right"]100,000.00[/TD]
[TD="align: right"]90,000.00[/TD]
[TD="align: right"]10,000.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]Television[/TD]
[TD="align: right"]80,000.00[/TD]
[TD="align: right"]75,000.00[/TD]
[TD="align: right"]5,000.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]Washing Machines[/TD]
[TD="align: right"]70,000.00[/TD]
[TD="align: right"]80,000.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]-10,000.00 [/TD]
[/TR]
[TR]
[TD]Refrigerator[/TD]
[TD="align: right"]70,000.00[/TD]
[TD="align: right"]65,000.00[/TD]
[TD="align: right"]5,000.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD]Mobile Phones[/TD]
[TD="align: right"]150,000.00[/TD]
[TD="align: right"]125,000.00[/TD]
[TD="align: right"]25,000.00[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
</tbody>[/TABLE]

My query is the subtotal of Electronics group forecast sale column showing as zero value which wrong.

I have created measures for each column as follows
target column = sumifs(Table 2 sumrange)
Total Sold column = sumifs(Table 4 sumrange)
Forecast Sale column = if((sumifs(Table 3 sumrange)-sumifs(table 4 sumrange))<0,0,(sumifs(Table 3 sumrange)-sumifs(table 4 sumrange)))
Variance = Target column - Total Sold column - Forecast Sale column

The correct figure should reflect on group level in Forecast Sale column as 45000 and in Variance column as - 10000.

Hope i have explained my issue properly.
Thank you so much in advance.
Best Regards
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,822
Messages
6,181,164
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