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 / Filter the gallery bas...
Power Apps
Answered

Filter the gallery based on 2 dropdown value as "And" or "Or" if the selected value is equals to "Yes" in the sharepoint column list.

(0) ShareShare
ReportReport
Posted on by 49

Hello everyone, does anyone of you know how can I filter with 2 dropdowns if the value of the choice column is "Yes". As you can see below, I am filtering based on their area of knowledge and the value of the dropdowns are hard coded because it will not look good as my SharePoint list column name is like WindTurbine_1 and so on. For now, it is filtering as one to one together with the willingness to travel location and I want them to be filtered if they are both selected.  

 

dazzle13_0-1711527315342.png

 

dazzle13_1-1711527504194.png

 

I have used switch case for now as a filter with my gallery but again I want my gallery to be filtering based on the selected area of knowledge and travel. How can I do this, below is my current formula for filtering as one to one.

 

If(
    dd_AOK.Selected.Value = "Wind Turbine",
    Filter(
        'db-Consultants-AOK',
        WindTurbines.Value = "Yes"
    ),
    dd_AOK.Selected.Value = "Cable",
    Filter(
        'db-Consultants-AOK',
        Cable.Value = "Yes"
    ),
    dd_AOK.Selected.Value = "Foundation",
    Filter(
        'db-Consultants-AOK',
        Foundation.Value = "Yes"
    ),
    dd_AOK.Selected.Value = "Substation",
    Filter(
        'db-Consultants-AOK',
        Substation.Value = "Yes"
    ),
    dd_AOK.Selected.Value = "Overall Project",
    Filter(
        'db-Consultants-AOK',
        OverallProject.Value = "Yes"
    ),  
    dd_AOK.Selected.Value = "Marine Coordination",
    Filter(
        'db-Consultants-AOK',
        MarineCoordination.Value = "Yes"
    ),
    dd_AOK.Selected.Value = "Marine Operation",
    Filter(
        'db-Consultants-AOK',
        MarineOperation.Value = "Yes"
    ),
    dd_Willingness.Selected.Value = "Online",
    Filter(
        'db-Consultants-AOK',
        WillingnessToTravel.Value = "Yes"
    ),
    dd_Willingness.Selected.Value = "Inside Country",
    Filter(
        'db-Consultants-AOK',
        WillingnessToTravel_Country.Value = "Yes"
 
and so on.....

 

 

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @dazzle13 

     

    Try this formula

     

    Filter(
    'db-Consultants-AOK',
    (dd_AOK.Selected.Value = "Wind Turbine" && WindTurbines.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Cable" && Cable.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Foundation" && Foundation.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Substation" && Substation.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Overall Project" && OverallProject.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Marine Coordination" && MarineCoordination.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Marine Operation" && MarineOperation.Value = "Yes"),
    (dd_Willingness.Selected.Value = "Online" && WillingnessToTravel.Value = "Yes") ||
    (dd_Willingness.Selected.Value = "Inside Country" && WillingnessToTravel_Country.Value = "Yes")
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • dazzle13 Profile Picture
    49 on at

    Thank you for your response, yes it is working but I also need it to be filtered even if there is only one selected dropdown and not only if they are both selected.

    dazzle13_0-1711528971459.png

    dazzle13_1-1711528991360.png

     

     

  • Verified answer
    Rajkumar_M Profile Picture
    3,747 Moderator on at

    Try this formula,

     

    Filter(
    'db-Consultants-AOK',
    (
    (dd_AOK.Selected.Value = "Wind Turbine" && WindTurbines.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Cable" && Cable.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Foundation" && Foundation.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Substation" && Substation.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Overall Project" && OverallProject.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Marine Coordination" && MarineCoordination.Value = "Yes") ||
    (dd_AOK.Selected.Value = "Marine Operation" && MarineOperation.Value = "Yes") ||
    IsBlank(dd_AOK.Selected.Value) // Check if the AOK dropdown is unselected or has a default value
    ) &&
    (
    (dd_Willingness.Selected.Value = "Online" && WillingnessToTravel.Value = "Yes") ||
    (dd_Willingness.Selected.Value = "Inside Country" && WillingnessToTravel_Country.Value = "Yes") ||
    IsBlank(dd_Willingness.Selected.Value) // Check if the Willingness dropdown is unselected or has a default value
    )
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • dazzle13 Profile Picture
    49 on at

    WHAT THE! Bro it actually worked thank you, you have saved me with my current project. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard