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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Filter Gallery by Supe...
Power Pages
Unanswered

Filter Gallery by Supervisor looking up the value in another Dataset

(2) ShareShare
ReportReport
Posted on by 125
Hello Everyone :)

I'm trying to filter a gallery by the current user of the app which at the same time is the supervisor of the agents that should appear on the gallery (each agent has a dedicated ticket).
The Supervisor information is taken from a second dataset.

Therefore, I set the "Items" attribute of my Gallery with the following formula:

Filter(
    Sort(
        Dataset1,
        'Status (TicketStatus)'.Value,
        SortOrder.Descending
    ),
    LookUp(
        Dataset2,
        AgentDataset1 = Agentdataset2
    ).Supervisor = AppUser
)
 
However, since each supervisor has several agents under his/her lead, the formula retrieves a table that does not filter the Gallery.

Anyone that can support me please?

Thanks
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,329 Super User 2025 Season 2 on at
     
    You have this but based on what you said above. (go below please)
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
        LookUp(
            Dataset2,
            AgentDataset1 = Agentdataset2
        ).Supervisor = AppUser
    )
     
    #1 example You want  something like  
     
    Now the below is based on the assumption for instance that you linked the Tables by email address for the supervisor, but I don't know that for sure.
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
         Supervisor = User().Email
    )
     
     
    #2 Example Let's pretend you did it by an Id field then you would do
     
    Filter(
        Sort(
            Dataset1,
            'Status (TicketStatus)'.Value,
            SortOrder.Descending
        ),
         SupervisorId = LookUp(Dataset2, SupervisorEmail = User().Email).Id
    )
     
    But I need more specific to give you your exact filter. but the above is how you want to do it (structurally)
     
    Your issue is you are literally joining the two together incorrectly because of your lookup
     
    If this helps please mark as such and maybe a like thanks!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard