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
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, @v-rongtiep-msft@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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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