web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Comparing two sharepoi...
Power Apps
Unanswered

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,679 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,679 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard