web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nested filter with sel...
Power Apps
Answered

Nested filter with self-referencing List

(0) ShareShare
ReportReport
Posted on by 65

Hi all

 

I have a complicated use case that I need your help on it

I have a list called "AssigendGoals" with contains the goals assigned for each employee, and for each employee they can assign a goal for their direct report and link this new goal with their own goal, so we'll have hierarchy of goals.

 

the requirement here is I want to create a gallery that filters "AssigendGoals" list with my assigned goal (as a user) and my manager's linked goal, and may manager's manager linked goal ... then the strategic objective which will be the highest in the hilarity

 

I made it only to the 3rd level through this formula, but failed to make it reach higher levels

could you please suggest better solution?

thanks

mohanade_0-1671442909161.png

 

Filter( AssignedGoals,ID=Gallery3.Selected.ID Or ID = Gallery3.Selected.'Manager Objective ID' Or
ID= LookUp(AssignedGoals,ID = Gallery3.Selected.'Manager Objective ID').'Manager Objective ID' Or
ID= LookUp(AssignedGoals,ID =LookUp(AssignedGoals,ID = Gallery3.Selected.'Manager Objective ID').'Manager Objective ID').'Manager Objective ID' )

 

Categories:
  • Verified answer
    victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    I would do something like this:

    With(
     {Id1:LookUp(AssignedGoals,ID = Gallery3.Selected.'Manager Objective ID').'Manager Objective ID'},
     With(
     {Id2:LookUp(AssignedGoals,ID = Id1).'Manager Objective ID'},
     With(
     {Id3:LookUp(AssignedGoals,ID = Id2).'Manager Objective ID'},
    
     Filter(
     AssignedGoals,
     ID=Gallery3.Selected.ID Or 
     ID = Gallery3.Selected.'Manager Objective ID' Or
     ID= Id1 Or
     ID= Id2 Or
     ID= Id3 
     )
     )
     )
    )

    If you need to go deeper just create more Withs.

     

    I hope it helps 🙂

  • mohanade Profile Picture
    65 on at

    Thank you so much, I really appreciate your effort and time, super helpful

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard