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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MalyMajo
Frequent Visitor

AD group and resource hierarchy

Hello all,

 

I have tabular data, which includes list of resources and the groups to which they belong.

Is it possible to format the data somehow to always show the structure when a resources is filtered?

 

IndexLevelValue
1Level1ProjectName_All
2Level2ProjectName_Team1
3Level3ProjectName_Team1_Offshore
4Level4peter.pan
5Level3ProjectName_Team1_Onshore
6Level4peter.parker
7Level4tony.hawk
8Level2ProjectName_Team2
9Level3ProjectName_Team2_Offshore
10Level4kendrick.lamar
11Level4tony.stark
12Level4slim.shady
13Level4cristiano.ronaldo
14Level4lionel.messi
15Level4alexander.ovechkin
16Level3ProjectName_Team2_Onshore
17Level4tony.hawk

 

So for example if I would filter tony.hawk, I would like to see following table:

 

IndexLevelValue
1Level1ProjectName_All
2Level2ProjectName_Team1
5Level3ProjectName_Team1_Onshore
7Level4tony.hawk
8Level2ProjectName_Team2
16Level3ProjectName_Team2_Onshore
17Level4tony.hawk

 

Please note, that resources can be in multiple teams. Additionally, resources does not necessary need to always be on "Level4". It can be anything between Level3 and Level6. 
Naming convention of groups is always same - in each case it starts with "ProjectName".

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @MalyMajo ,

 

To filter like this in Power Query, you would do the following:

Table.SelectRows(
    previousStep,
    each [Value] = "tony.hawk" or Text.Contains([Value], "ProjectName")
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Actually, the project name never contains "ProjectName", it was just an example.

What I want to achieve is to see the hierarchy. So if I filter Tony Hawk, I want to see under which hierarchy he belongs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.