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 Automate / Replace/ Remove Blank ...
Power Automate
Unanswered

Replace/ Remove Blank value in Body/ Item - Transform Input from Array to integer to Single Number

(0) ShareShare
ReportReport
Posted on by 6

Hi everyone.

 

I'm currently developing a Flow in which the numbers are extracted from SharePoint list (from Get Item).

However, there is a blank (aka Null) in the value section (after Select)

 

My objective is calculating the sum of numbers (via XPath method/ addition of integers in the body)

 

WithBlank

straight1_0-1667448603211.png

 

NoBlank

straight1_1-1667448623843.png

 

Add

straight1_2-1667448651024.png

 

Flow

straight1_3-1667448694999.png

 

What are the suggested actions and expressions, from WithBlank to NoBlank to Add?

 

I realise the input collected earlier steps are in array/ string type, so maybe need to change it to integer in WithBlank step

 

If possible, how about replace the "" (blank)/ null in WithBlank to 0? What is the action/ expression?

 

Most of the use cases I found online are on Power BI/ Power App, so your assistance is truly appreciated.

 

Thank you

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    This should be what you are after. Note I've stated with the list of numbers as strings.

     

    grantjenkins_0-1667449938576.png

     

    Compose is your array of numbers (strings).

    grantjenkins_1-1667449982682.png

     

    Filter array can be used to remove empty strings as so. Note the expression is just item()

    grantjenkins_2-1667450017770.png

     

    JSON converts the output to XML.

    grantjenkins_3-1667450054709.png

     

    And finally, your xpath to sum up the numbers.

    xpath(xml(outputs('JSON')), 'sum(/root/Numbers)')

    grantjenkins_4-1667450078327.png

     

    Result is:

    grantjenkins_5-1667450163640.png

     

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 Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard