Power Pivot - hierarchy

joslaz

Board Regular
Joined
May 24, 2018
Messages
76
Hey community!


I am getting deeper and deeper into the world of Power Query and Power Pivot. It brings a lot of potential and makes my job a lot easier. Currently I am facing the following problem:I have the following two tables in Power Query, which I want to load in Power Pivot and present them as Pivot Table, etc .:


TblContracts
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Section[/TD]
[TD]Area[/TD]
[TD]Department[/TD]
[TD]Contracts[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]AA1[/TD]
[TD]900[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]AA2[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]AA2[/TD]
[TD]550[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]A[/TD]
[TD]3[/TD]
[TD]AA1[/TD]
[TD]500[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]AB[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]A[/TD]
[TD]3[/TD]
[TD]A[/TD]
[TD]5500[/TD]
[/TR]
[TR]
[TD]05.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]A1[/TD]
[TD]550[/TD]
[/TR]
</tbody>[/TABLE]

TblStaff
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Section[/TD]
[TD]Area[/TD]
[TD]Department[/TD]
[TD]Staff[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]AA1[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]AA2[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]01.01.2018[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]AA2[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]A[/TD]
[TD]3[/TD]
[TD]AA1[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]AB[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]02.01.2018[/TD]
[TD]A[/TD]
[TD]3[/TD]
[TD]A[/TD]
[TD]55[/TD]
[/TR]
[TR]
[TD]05.01.2018[/TD]
[TD]A[/TD]
[TD]1[/TD]
[TD]A1[/TD]
[TD]
1[/TD]
[/TR]
</tbody>[/TABLE]



I now connect both tables using a calendar table and the date. Now I have to somehow connect the Sections, Areas and Departments to get a value from Contracts / Number of Employees at the end.

How is this implemented?
Using Hierarchies?


And, how can I upload a sample table here in Foum? I can not find an entry anywhere.


Do you need more information?

greetins
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Ok, many thanks!

So I need just a key table with unique keys, right?
What is about the hierarchy function?
I thought this would help. Or is this approach for something different?
 
Upvote 0
Yeah, you just need a table with a unique key (at the lowest level of granularity) for every entity you want to filter across both tables. If you want to report on the other columns, you should load that into the common lookup table too. You don’t need hierarchies to do this, you can just use any column from the lookup table in your report
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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