PowerPivot: Reports using parent and child tables

manzoo79

New Member
Joined
Dec 20, 2012
Messages
1
Hi,
Have a parent table with following Data.

ChildName
ChildName
1
Parent1
2
Parent2

<tbody>
</tbody>
Child table with following data. ParentID(FK) is referenced to the above table.

ChildID
ChildName
ParentID
1
Child 1
1
2
Child 2
1

<tbody>
</tbody>
Both the above tables are in SQL Server.
I would like to create a report having Parent Name and the child names in a grid like the one below.

Name
ChildName
Parent1
Child 1
Parent1
Child 2
Parent2
Child 3
Parent2
Child 4

<tbody>
</tbody>

I imported both the values using the power pivot wizard and then created a flattened power pivot and pulled in Name from Parent Table to Rows fields and then dragged ChildName column from Child table on to the Rows Field.
But I am getting a report where the data is duplicated irrespective of the foreign key constraint.

Name
ChildName
Parent1
Child 1
Parent1
Child 2
Parent1
Child 3
Parent1
Child 4
Parent2
Child 1
Parent2
Child 2
Parent2
Child 3
Parent2
Child 4

<tbody>
[TD="colspan: 2"]Parent1 Total
[/TD]

[TD="colspan: 2"]Parent2 Total
[/TD]

</tbody>

Can you please suggest me how to handle this?
Thanks and Regards,
Manjunath
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,934
Messages
6,175,487
Members
452,648
Latest member
Candace H

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