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 / PowerApps Filter Problem
Power Apps
Answered

PowerApps Filter Problem

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Dear users,

I am trying to build a power app and I feel like I crash on a wall. The Use case is : I want to filter my source ('Master source' in this case a SharePoint list) by Project title and replacement project.

I want to fulfill also 4 scenarios,

  • If both drop-downs are empty
  • If dropdown1 is empty and dropdown2 has a value
  • If dropdown2 is empty and dropdown 1 has a value
  • If both dropdowns have value

And I want it also to filter some fields of my SharePoint list :

  • Type= "Application"
  • TargetDecision= "Migration"
  • Madrid_DB2 = " Madrid and Evonik"
  • Madrid_DB"= "Evonik Only"

 

 

My code is with blue underlined and looks like this:

 

Filter(
'Master Source';

If(
And(IsBlank(Dropdown1.SelectedText.Value);IsBlank(Dropdown2.SelectedText.Value));And(Type="Application"; TargetDecision.Value="Migration"; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));

If(
And(Not(IsBlank(Dropdown1.SelectedText.Value));Not(IsBlank(Dropdown2.SelectedText.Value)));And(Type="Application"; TargetDecision.Value="Migration";ReplacementTechnology.Value=Dropdown2.SelectedText.Value;ReplacementProject_PPM.Value=Dropdown1.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));

If(
And(Not(IsBlank(Dropdown1.SelectedText.Value)); (IsBlank(Dropdown2.SelectedText.Value)));And(Type="Application"; TargetDecision.Value="Migration";ReplacementProject_PPM.Value=Dropdown1.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"));
And(Type="Application"; TargetDecision.Value="Migration";ReplacementTechnology.Value=Dropdown2.SelectedText.Value; Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only"))


))))

 

 

I have attached a Pic just to visualize the app. If anyone can help me I would be grateful !!

Unbenanntes Bild.png
Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try this code:

    Filter('Master Source'; Type="Application" && TargetDecision.Value="Migration" && Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only") && If(IsBlank(Dropdown1.SelectedText.Value); true; ReplacementProject_PPM.Value=Dropdown1.Selected.Value) && If(IsBlank(Dropdown2.SelectedText.Value); true; ReplacementTechnology.Value=Dropdown2.Selected.Value))

    If this doesn't work, please post back the error screenshots of code, and the date type of these fields.

    Best regards,

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @v-siky-msft 

     

    Thank you for replying to my post. The costumer decided to change a bit the User Story , so i need to filter the drop-downs in 2 screens. The error that i get is a blue line under the code before the IF Filter('Master Source'; Type="Application" && TargetDecision.Value="Migration" && Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only") && If(IsBlank(Dropdown1.SelectedText.Value); true; ReplacementProject_PPM.Value=Dropdown1.SelectedText.Value))

    Powerapp problem.PNG

    as far i understand it tells me that my drop-downs are looking in a Table for Information, but it is a SharePoint list behind...

     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Powerapp problem.PNG

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous

    Could you share the detailed error information with the formula?

    What are the date types of 'ReplacementProject_PPM' and 'ReplacementTechnology' columns? Could you please share the Items property of Dropdown1?

     

    This delegation error is seemly caused by the IF function inside the Filter function. So I suggest move the IF function out of the filter function, first to check if the dropdown is blank, and then filter the SP list. Please try this code:

     

    If(IsBlank(Dropdown1.Selected.Value); Filter('Master Source'; Type="Application" && TargetDecision.Value="Migration" && Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only")); Filter('Master Source'; Type="Application" && TargetDecision.Value="Migration" && Or(Madrid_DB2.Value="Madrid and Evonik";Madrid_DB2.Value="Evonik only") && ReplacementProject_PPM.Value=Dropdown1.Selected.Value))

     

    Best regards,

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This Formula is working perfectly!! thank you very much!! My data Columns in SP are simple line of text and i Just added a Gallery and a Dropdown that takes the data from those columns and filter them (with other 3 Columns) and gives me the results. Thank you very much 🙂

     

     PowerApp Solution1.PNGPowerApp Solution2.PNG

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard