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 / Filters - filtering on...
Power Apps
Answered

Filters - filtering on multiple data sources

(0) ShareShare
ReportReport
Posted on by 26
Still a little stuck here!
 
I have two data sources, both containing a 'Tasks' column.  I want to set the items property of my gallery to filter both data sources on 'Tasks' according to the selected values.
 
The statement also contains a lookup which is working fine (thanks a contributor on this forum!)
 
AddColumns(
   Filter(
      'Engagement Tasks',
      Title = Gallery2_1.Selected.Value),
&&
    Filter(
        'Engagement Phases',
      Title = TabPhases.Selected.Value),
),
   Description,
   LookUp(
      'Engagement Phases' As _Data,
      _Data.Tasks = Tasks
   ).Description
)
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Ravi-Prajapati Profile Picture
    416 Moderator on at

    It looks like you're trying to filter two different data sources ('Engagement Tasks' and 'Engagement Phases') based on selections from Gallery2_1 and TabPhases. However, the way you've structured the Filter functions with && is causing an issue because you're trying to apply two independent filters to separate tables at the same level.

    Corrected Approach:

    Instead of filtering both tables together with &&, you need to:

    1. Filter 'Engagement Tasks' based on the selected value in Gallery2_1.
    2. Filter 'Engagement Phases' based on the selected value in TabPhases.
    3. Use AddColumns to add a Description column from 'Engagement Phases' by looking up the matching Tasks.

    Here’s a revised version of your formula:

    AddColumns(
    Filter(
    'Engagement Tasks',
    Title = Gallery2_1.Selected.Value
    ),
    "Description",
    LookUp(
    'Engagement Phases',
    Title = TabPhases.Selected.Value && Tasks = ThisRecord.Tasks,
    Description
    )
    )

    Explanation:

    1. Filter 'Engagement Tasks'
      • It selects only tasks where Title matches Gallery2_1.Selected.Value.
    2. AddColumns adds the "Description" column.
    3. LookUp('Engagement Phases', ...)
      • Finds the corresponding Description where:
        • The Title matches TabPhases.Selected.Value
        • The Tasks match the current record's Tasks from 'Engagement Tasks'.

    Expected Behavior:

    • The gallery will now display tasks from 'Engagement Tasks' filtered by Gallery2_1.Selected.Value, along with their matching Description from 'Engagement Phases'.
  • Verified answer
    WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    I think you are trying to do this - I will give you a HI (human intelligence) response as the first post appears to be straight from ChatGPT.
    AddColumns(
       Filter(
          'Engagement Tasks',
          Title = Gallery2_1.Selected.Value || Title = TabPhases.Selected.Value
       ),
       Description,
       LookUp(
          'Engagement Phases' As _Data,
          _Data.Tasks = Tasks
       ).Description
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • ET-04121333-0 Profile Picture
    26 on at
    Thank you for the responses!  Yes, AI has gotten me into this muddle :)
     
    Using either of the suggested approaches works fine to apply the first filter on the 'Engagement Tasks' data source.
     
    However, the gallery is still not filtering Tasks based on the value selected in TabPhases (this references a different data source called 'Engagement Phases'.
     
     
  • Suggested answer
    WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    Now I see that, I am trying to work out exactly what you want. If you want the two filtered data sets in the Gallery, you can do this
    Table(
       AddColumns(
          Filter(
             'Engagement Tasks',
             Title = Gallery2_1.Selected.Value
          ),
          Description,
          LookUp(
             'Engagement Phases' As _Data,
             _Data.Tasks = Tasks
          ).Description
       ),
       Filter(
          'Engagement Phases',
          Title = TabPhases.Selected.Value),
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard