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 / Applying Filter to Exc...
Power Automate
Unanswered

Applying Filter to Excel List rows with Filter Array

(0) ShareShare
ReportReport
Posted on by 39

Hello Team,

 

I'm trying to apply a filter to information extracted from an excel file (List Rows) and put into an HTML table that will then go into an email.  The file is being used as a quote sheet, so sometimes a row will be blank if the customer doesn't want the item.  I'm trying to use the Filter Array option to filter out empty rows by only showing items with a value grater than 0.  I've used the int(item()?['Quantity']) expression in the filter criteria, but I'm getting the below error message.  

 

InvalidTemplate

The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@greater(int(item()?['Quantity']),0)' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
 
I should note that the column I'm trying to pull from in excel is using data validation to provide a drop down list of possible selections, not sure if that would require a different type of conversion?  I could use another column within the file, but it pulls in a decimal and the excel file does contain a formula to return "" if not valid.
 
Any help is appreciated!  Thank you!
 
 
Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    on at

    Hi @Ninetails ,

     

    This is because int can't convert blank value to number.

    Please try this:

    vmengmlimsft_0-1708614909089.png

     

    Best regards,

    Rimmon

     

  • Ninetails Profile Picture
    39 on at

    Hi @v-mengmli-msft ,

    it won't let me leave it blank, I thought of that as well and this is the error I get.

    Ninetails_0-1708615607087.png

     

    If I put a space in the "Choose a value" location, it will run, but the outputs do not filter the blank columns.

    Ninetails_2-1708616101330.png

     

    Thanks,

     

    Ninetails

  • Verified answer
    v-mengmli-msft Profile Picture
    on at

    Hi @Ninetails ,

     

    In theory it allows blank value. You can also try using expression. If below expression doesn't work, I suggest you switch to classic mode or delete this action and add it again.

    equals(item()?['Quantity'],'')
    

    vmengmlimsft_0-1708616709870.png

     

     

    Best regards,

    Rimmon

  • Verified answer
    Ninetails Profile Picture
    39 on at

    This worked, but I had to change the value to 'false' to remove the blank rows.  Thank you!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard