Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Hierachical rollup

hierachyI need to go from this:

 

PhoneUserIDManagerIDCost
(111) 111-11111  $    21.00
(111) 111-111221 $    25.00
(111) 111-111331 $    24.00
(111) 111-111441 $    27.00
(111) 111-111551 $    21.00
(111) 111-111662 $    24.00
(111) 111-111772 $    21.00
(111) 111-111882 $    25.00
(111) 111-111993 $    24.00
(111) 111-1120103 $    27.00
(111) 111-1121113 $    21.00
(111) 111-1122124 $    24.00
(111) 111-1123134 $    21.00
(111) 111-1124144 $    25.00
(111) 111-1125157 $    24.00
(111) 111-1126167 $    27.00
(111) 111-1127178 $    21.00
(111) 111-11281810 $    24.00
(111) 111-11291910 $    21.00
(111) 111-11302010 $    25.00

 

to a hiearchical rollup 

 

L0L0CostL0RollUpL1L1CostL1RollUpL2L2CostL2RollUpL3L3CostL3RollUp
            
1 $    21.00 $    21.00   $    97.00      
   2 $    25.00    $    70.00   
      6 $    24.00    
      7 $    21.00    $    51.00
         15 $    24.00 
         16 $    27.00 
      8 $    25.00    $    21.00
         17 $    21.00 
   3 $    24.00    $    72.00   
      9 $    24.00    
      10 $    27.00    $    70.00
         18 $    24.00 
         19 $    21.00 
         20 $    25.00 
      11 $    21.00    
            
   4 $    27.00    $    70.00   
      12 $    24.00    
      13 $    21.00    
      14 $    25.00    
            
   5 $    21.00       
Total  $    21.00   $    97.00   $  212.00   $  142.00

 

I created a SQL view to give me the levels through outer joins but having difficult getting the cost rollup to work.

2 ACCEPTED SOLUTIONS
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous - Have you tried the pattern found at https://www.daxpatterns.com/parent-child-hierarchies/ ? You'll likely want to reference your data table keeping only [UserID] & [ManagerID] to make your 'hierarchyTable'. I mocked up a file for you however my reply message no longer shows any features like adding attachments or pictures , etc.





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

Anonymous
Not applicable

Thanks I will give it a try 🙂 Looks promising!

View solution in original post

4 REPLIES 4
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous - Have you tried the pattern found at https://www.daxpatterns.com/parent-child-hierarchies/ ? You'll likely want to reference your data table keeping only [UserID] & [ManagerID] to make your 'hierarchyTable'. I mocked up a file for you however my reply message no longer shows any features like adding attachments or pictures , etc.





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

Thanks I will give it a try 🙂 Looks promising!

@Anonymous,

 

By the way, you may share the solution here once it is solved. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

This solution worked great. Key thing is to ensure all the managers are indeed users and the top manager (CEO) does not have a manager.

 

Stephen

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.