PowerBI Measure to calculate Sales Goals with Reports To: structure.

scpournara

New Member
Joined
Aug 24, 2014
Messages
41
I am trying to use PowerBI to calculate Sales Goals for all employees of a company based on a Reporting structure where most employees have Customer responsibility. One table is an HR Data table that references an employee and who they Report To. The second table is fact data that details the Employees accounts and the units that they re Budgeted to sell. The Output is to calculate an Individual Goal and a Team Goal using the Tables using Power BI. The individual Goal is easy, but the Team goal is difficult as it only sum up the accounts that are based on the Reports To. I found this difficult to write a measure. During the year, we could change the Reports To structure and the Accounts Assigned To and it would by dynamic. Can't seem to wrap my head around this one.



PowerBI.Heirarchy.Problem.xlsx
ABCDEFGHIJKL
1InputsOutput
2HR Data TableFact Data TableResults Table
3Employee Reports To:Account NameAccount AssignedUnits BudgetIndividual GoalTeam GoalCommentsRange
4Company PresidentCustomer #1Rainbow Seller - Leader5Company President-1,450=SUM(F4:F48)
5Rainbow Seller - LeaderCompany PresidentCustomer #2Rainbow Seller - Leader5Rainbow Seller - Leader251,400Red, Orange & Green Sellers = 50 + 100 + 350 + 550 + 350=SUM(F9:F43)
6Red Sellers - MgrRainbow Seller - LeaderCustomer #3Rainbow Seller - Leader5Red Sellers - Mgr50350Red Sellers 1 & 2 = 150 + 200=SUM(F19:F28)
7Orange Seller - MGRRainbow Seller - LeaderCustomer #4Rainbow Seller - Leader5Orange Seller - MGR100550Orange Seller 1 & 2 = 250 + 300=SUM(F29:F38)
8Red Seller - 1Red Sellers - MgrCustomer #5Rainbow Seller - Leader5Red Seller - 1150-No Reports To, No Team Goal
9Red Seller - 2Red Sellers - MgrCustomer #11Red Seller - Mgr10Red Seller - 2200-No Reports To, No Team Goal
10Orange Seller - 1Orange Seller - MGRCustomer #12Red Seller - Mgr10Orange Seller - 1250-No Reports To, No Team Goal
11Orange Seller - 2Orange Seller - MGRCustomer #13Red Seller - Mgr10Orange Seller - 230025Tangerine seller = 25=SUM(F44:F48)
12Green Seller - 1Rainbow Seller - LeaderCustomer #14Red Seller - Mgr10Tanerine Seller - 125No Reports To, No Team Goal
13Tanerine Seller - 1Orange Seller - 2Customer #15Red Seller - Mgr10Green Seller - 1350-No Reports To, No Team Goal
14Customer #21Orange Seller - MGR201,450
15Customer #22Orange Seller - MGR20
16Customer #23Orange Seller - MGR20
17Customer #24Orange Seller - MGR20
18Customer #25Orange Seller - MGR20
19Customer #31Red Seller - 130
20Customer #32Red Seller - 130
21Customer #33Red Seller - 130
22Customer #34Red Seller - 130
23Customer #35Red Seller - 130
24Customer #41Red Seller - 240
25Customer #42Red Seller - 240
26Customer #43Red Seller - 240
27Customer #44Red Seller - 240
28Customer #45Red Seller - 240
29Customer #51Orange Seller - 150
30Customer #52Orange Seller - 150
31Customer #53Orange Seller - 150
32Customer #54Orange Seller - 150
33Customer #55Orange Seller - 150
34Customer #61Orange Seller - 260
35Customer #62Orange Seller - 260
36Customer #63Orange Seller - 260
37Customer #64Orange Seller - 260
38Customer #65Orange Seller - 260
39Customer #71Green Seller - 170
40Customer #72Green Seller - 170
41Customer #73Green Seller - 170
42Customer #74Green Seller - 170
43Customer #75Green Seller - 170
44Customer #76Tanerine Seller - 15
45Customer #77Tanerine Seller - 15
46Customer #78Tanerine Seller - 15
47Customer #79Tanerine Seller - 15
48Customer #80Tanerine Seller - 15
49Total1450
50
Sheet1
Cell Formulas
RangeFormula
J4J4=SUM(F4:F48)
J5J5=SUM(F9:F43)
J6J6=SUM(F19:F28)
J7J7=SUM(F29:F38)
J11J11=SUM(F44:F48)
I5I5=SUM(F4:F8)
I6I6=SUM(F9:F13)
I7I7=SUM(F14:F18)
I8I8=SUM(F19:F23)
I9I9=SUM(F24:F28)
I10I10=SUM(F29:F33)
I11I11=SUM(F34:F38)
I12I12=SUM(F44:F48)
I13I13=SUM(F39:F43)
I14I14=SUM(I5:I13)
F49F49=SUM(F4:F48)
 

Attachments

  • Screenshot 2024-04-22 074656.png
    Screenshot 2024-04-22 074656.png
    194.7 KB · Views: 3
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,215,415
Messages
6,124,764
Members
449,187
Latest member
hermansoa

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