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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
oscargushiken
Frequent Visitor

How to use enumerate data based on a roll up to structure in a different table?

Hi all,

 

I am attempting to enumerate a list of all the Employee_IDs that exist in an Organizational hierarchy, and not getting very far.

 

Meaning that if I were to select a particular Org_Unit_Mgr in my slicer, that I might be able to see all the employees that are under that Org_Unit_Mgr by tracking the relationship of how the Organizational units roll up to each other.

 

EMPL_ORG_HISTORY    
Employee_IDEmployee_NMOrg_Unit_CodeStart_DateEnd_Date
00000001John Doe12301/1/202212/31/2023
00000002Jennifer Mary23401/1/202212/31/2023
00000003Matthew John34501/1/202212/31/2023
00000004David Michael23421/1/202212/31/2023
00000005Richard Joseph23441/1/202212/31/2023
00000006Christopher Robin34521/1/202212/31/2023
00000007Donald Duck34561/1/202212/31/2023
00000008Charles Martel34531/1/202212/31/2023
00000009William Wallace34541/1/202212/31/2023
00000010Forest Gump23421/1/202212/31/2023
00000011Dan Taylor23441/1/202212/31/2023
00000012Winnie Poo34521/1/202212/31/2023
00000013Mickey Mouse34561/1/202212/31/2023
00000014Clark Kenneth34531/1/202212/31/2023
00000015Bruce Wayne34541/1/202212/31/2023
00000016Tim Drake34541/1/202212/31/2023

 

ORG_HIST_EXPLODE  
Org_Unit_Roll_ToOrg_Unit_CodeOrg_Unit_Explode
null12302340
null12303450
123023402342
123023402344
234023422342
234023442344
345034523453
345034523454
345034563456
345234533453
345234543454

 

oscargushiken_0-1686760962040.png

 

So that if in my slicer I were to select Christopher Robbin as my Org_Unit_Mgr, then I would see a table visual listing out not just Winnie Poo, but also include Charles Martel, Clark Kenneth, William Wallace, Bruce Wayne, and Tim Drake.

 

In short what is a good way to enumerate/display employee data based on a roll up to structure in a different table?

@Ashish_Mathur, @Anonymous, @lbendlin@amitchandak

1 REPLY 1
lbendlin
Super User
Super User

Familiarize yourself with the PATH functions in DAX and learn about ragged hierarchies.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.