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
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