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 / How to exclude a row o...
Power Apps
Answered

How to exclude a row of my sharepoint list

(0) ShareShare
ReportReport
Posted on by 105

Hi,

How can I exclude a row of my sharepoint list to be considered? Currently I am using this formula: 

Something that says TotalMeals besides "Milan" row and "Paris" row  in the SharePoint list. How should I then update the below to reflect this?

 

"The most meals packed are in: " &
First(Sort(FullData, TotalMeals, Descending)).Location2 &
" where " &
Text(First(Sort(FullData, TotalMeals, Descending)).TotalMeals, "#,###") &
" have been packed!"

 

Best,

Su

Categories:
  • Verified answer
    Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @Sussan 

     

    You could write the query like this, adjusting the nr of non Milan Paris locations in the filter query. Rather than duplicate large chunks of code, we use the with function to create a variable which is only used/available in the context of this expression (i.e. 'varwFilter' in this case. 

     

    Note, the reason it is filtered like this is to ensure the query is delegable to SharePoint.

    With(
     {varwFilter: 
     First(
     Sort(
     Filter(
     FullData, 
     Location2 = "Other Location A" ||
     Location2 = "Other Location B" ||
     Location2 = "Other Location C" ||
     Location2 = "Other Location D" ||
     Location2 = "Other Location E" ||
     Location2 = "Other Location F"
     ),
     TotalMeals, 
     Descending
     )
     )},
    
    "The most meals packed are in: " & varwFilter.Location2 & " where " & Text(varwFilter.TotalMeals, "#,###") & " have been packed!"
    )

     

    However, if the above approach would result in the need to list out loads of Location2 options and provided the nr of rows in your data source are below the currently set data row limit, you could just use the following simpler, but non-delegable query:

    With(
     {varwFilter: 
     First(
     Sort(
     Filter(
     FullData, 
     Location2 <> "Milan" && Location2 <> "Paris"
     ),
     TotalMeals, 
     Descending
     )
     )},
    
    "The most meals packed are in: " & varwFilter.Location2 & " where " & Text(varwFilter.TotalMeals, "#,###") & " have been packed!"
    )

     

    Hope this helps

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
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard