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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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