Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Use Filter Function for Value > 0

(0) ShareShare
ReportReport
Posted on by 39

I'm hoping this is just a small syntax error. I'm trying to get a gallery to display records only when the value from a specific column is 1 or higher (basically, when one specific employee has at least one item in a given row/record checked out from the office). Currently the gallery works if I leave the code as simply drawing data from my collection ("OnHand," generated when I hit the "refresh" button), but if I try to filter as "Filter( OnHand, With_x0020_April > 0 )" I get an error that it was expecting a number value, and if I try "Filter( OnHand, With_x0020_April.Value > 0 )" I get a message that "." is invalid. Can anyone suggest an alternate syntax?

  • LauradeBoer Profile Picture
    LauradeBoer 39 on at
    Re: Use Filter Function for Value > 0

    That's got it! Thank you both!

  • Verified answer
    mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Use Filter Function for Value > 0

    @LauradeBoer 

    My first guess would be that With_x0020_April is not a number data type.  Perhaps its text or something else.  What happens if you do this>

    Filter(OnHand, Value(With_x0020_April) > 0)

     

    I know it will throw a delegation warning but do any results show in the gallery?

     

    ---
    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."

  • Verified answer
    Re: Use Filter Function for Value > 0

    Try Value(With_x0020_April) instead of just 'With_x0020_April'

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard