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 Apps
Answered

Dual Filter issue

(0) ShareShare
ReportReport
Posted on by 33

Hello i am trying to do a filter on a galley from my a SharePoint list to only show items that are part of their department  which does work but also want to give them an option in a drop down to sort  some more depending on the status of the items they see. 

 

this is my Department Sort 

 

 

SortByColumns(Filter(ServiceRequest,Department=Office365Users.MyProfile().Department),"{Identifier}",Ascending)

 

PAppService Request.jpg

this is the gallery and want the select box which is getting the status from my SharePoint list to filter the items i see.

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Nix23 

    Please try using this code in the Items property of your gallery.

     

    SortByColumns(
     Filter(
     ServiceRequest,
     Department=Office365Users.MyProfile().Department,
     IsBlank(Dropdown1.Selected.Value)=true Or Status = Dropdown1.Selected.Value
     ),
     "{Identifier}",
     Ascending
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Nix23 Profile Picture
    33 on at

    I Looks like it does not like that even thought i changed it to the dropdown name which again is connected to the same SharePoint List 

     

    SortByColumns(
    Filter(
    ServiceRequest,
    Department=Office365Users.MyProfile().Department,
    IsBlank(StatusSelector.Selected)=true Or Status = StatusSelector.Selected,
    ),
    "{Identifier}",
    Ascending
    )

     

     

    this is what the drop down has 

     

    Distinct(ServiceRequest,Status.Value)

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @nix
    Your DISTINCT code changes the column name to “Result”. Therefore we must make a reference to “Result” instead of “Value”. See my updated code below.

    SortByColumns(
    Filter(
    ServiceRequest,
    Department=Office365Users.MyProfile().Department,
    IsBlank(StatusSelector.Selected.Result)=true Or Status = StatusSelector.Selected.Result
    ),
    "{Identifier}",
    Ascending
    )

  • Nix23 Profile Picture
    33 on at

    Thanks but now i get this message and nothing from the SharePoint List 

     

    this is in the Item field for the gallery is that correct or should it be in the Dropdown? 

     

     

    PAppService Request1.jpg

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Nix23 

    The Items property of the Gallery is where the code should go.  Please share a screenshot of the error message.

  • Nix23 Profile Picture
    33 on at

    PAppService Request2.jpg

     

    above this reply i have the function window with the errors when you look at the copied filter you created to fix it. 

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Nix23

    Likely it is a small syntax error.  I see an extra comma here.  Now it is removed from my posts.

     

    xyz.png

  • Nix23 Profile Picture
    33 on at

    I also retyped everything thinking maybe my copy added a space or something weird but still getting the message let me know if i can not showing the correct screen shots 

    PAppService Request4.jpgPAppService Request3.jpg

    PAppService Request2.jpg

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Nix23 

    Delete this commaUntitled.png

  • Verified answer
    Nix23 Profile Picture
    33 on at

    @mdevaney   removing the comma seems to have fixed part of the issue but now the thisitem.title  says its invalid from the SharePoint List

     

     

    found the issue 

     

    SortByColumns(
    Filter(
    ServiceRequest,
    Department=Office365Users.MyProfile().Department,
    IsBlank(StatusSelector.Selected.Result)=true Or Status.Value= StatusSelector.Selected.Result
    ),
    "{Identifier}",
    Ascending
    )

    weird that i did not see that it needed the Status.Value =   😁

     

     

    pa4.jpg

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard