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 Automate / Filter Negative Value ...
Power Automate
Answered

Filter Negative Value in Power Automate

(2) ShareShare
ReportReport
Posted on by 45
Hello,
 
I am new to power automate and still learning. I have this problem when it comes to using Filter Array.
 
In my flow, I tried to filter using OR because I have two conditions:
1. Table in the email shows Days column which value is positive
2. Shows Days column which value is greater than -10
 
When I wrote the condition like this, it successfully shows the positive value but failed to show the value between -10 and 0.
@or(not(contains(item()?['Days'], '-')),greaterOrEquals(item()?['Days'], '-10'))
This is a bit of my flow, filter Department is only for filtering people I want to send the email to.
 
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    What is the data type of your Days field? Is it a string (blue between double quotes) or a number (green without quotes)?
     
    If it is a number you might need to use an int function in your expression.
     
    I have tried to reproduce your expression, works fine for me when I uses string values.
     
    Below was my test setup.
     
     
    Test result
     
     
     
  • veracruz Profile Picture
    45 on at
    Hi @Expiscornovus, thank you, I'll try it first.
  • veracruz Profile Picture
    45 on at
     
    My data type is string, is there something wrong with the flow before it? I acquired the data from a spreadsheet (List rows present in System) and compose it first before I used it as an input in Filter array Days. This is how the flow above it looks like.
     
    Data inside the Spreadsheet
     
    The flow

      
     
     
    The result.
     
     
    There are still values less than -10 appear in the result.
     
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
    Sorry for the delayed reply. Thanks for sharing the rest of the screenshots, that is useful.
     
    I think it might be useful to convert your Days field value to an int first. You can use a Select action for that. After that the filtering in the Filter Array should work with and the or operator statement. 
     
     
     
    Below is the test result of that setup.
     
  • veracruz Profile Picture
    45 on at
    Hi, @Expiscornovus, thank you so much. It works now!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard