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 / Comparing two sharepoi...
Power Apps
Answered

Comparing two sharepoint columns in filter

(0) ShareShare
ReportReport
Posted on by 195

Hi all - probably a ridiculously simple one and I'm a numpty but...

 

I want to filter a gallery based on a sharepoint list for only the items where one number column is greater than another. I've tried writing it like this and it cuts out all the items and gives me an empty gallery, despite there being around a dozen in my data that would qualify:

 

Filter('NCP WEX Jobs','Slots Available' > 'Slots Filled')

 

I've tried googling around and I just can't see what I'm doing wrong. Intellisense isn't giving me any errors or warnings, it all looks fine, it just doesn't display any items.

 

Help!

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @crispybits1977 - 

     

    For whatever reason I have not found time to understand, when filtering directly onto the data source, you will need to wrap either field with the Value function.

     

    Filter('NCP WEX Jobs','Slots Available' > Value('Slots Filled'))

     

    However, an unfortunate side effect is that this is not delegable.

     

    @WarrenBelz / @timl might have more insights on this behaviour.

  • crispybits1977 Profile Picture
    195 on at

    Thanks @Amik - I found out the same thing through google in the end (it wasn't easy to find!) so I ended up adding another column in the sharepoint list to do the sum and extra code in my app on all the patches for that column. It being non-delegable isn't an option as I fully expect this list to exceed 2000 records fairly quickly (within a year)

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @crispybits1977 - hopefully that column you added is not a calculated SharePoint column?

  • crispybits1977 Profile Picture
    195 on at

    @Amik no just a normal column, that's why I had to edit all the patch commands in my app to include it

     

    Thankfully as part of my googling around trying to work out a workaround I found the info about calculated columns not playing nicely with power apps

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
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard