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 / Sum Total is Blank if ...
Power Apps
Unanswered

Sum Total is Blank if a Label is Blank

(0) ShareShare
ReportReport
Posted on by 28

Hi All,

This is giving me a Blank value if either one of the Labels is Blank, any ideas? I thought the Coalesce would fix it.

 

Text(
Coalesce(Sum(Label8_137.Text),0)+Coalesce(Sum(Label8_153.Text),0)
,
"[$-en-US]#,##0.0"
)

 

Thank you

Categories:
I have the same question (0)
  • Jooorge Profile Picture
    28 on at

    Also tried:

     

    Text(
    Sum(Coalesce(Value(Label8_138.Text),0),Coalesce(Value(Label8_154.Text),0))
    ,
    "[$-en-US]#,##0.0"
    )

  • Community Power Platform Member Profile Picture
    on at

    Hmm I'm not able to reproduce that. I created two labels (one set to 30 and the other set to 20) and set your logic as the third label text. I then remove my number values from one of the labels and I still get a result. I also set the label to Blank() and that didn't change the outcome.

  • Jooorge Profile Picture
    28 on at

    I have something weird going on @Anonymous 

    Screenshot_19.png

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Coalesce evaluates whether strings are null, not blank.  You have to use an isBlank() to check for Blank labels.

     

  • Jooorge Profile Picture
    28 on at

    @Pstork1  I would have to use If statements to change to 0s if I use IsBlank() right?

     

    did a quick check on this:

    The Coalesce function evaluates its arguments in order and returns the first value that isn't blank or an empty string. Use this function to replace a blank value or empty string with a different value but leave non-blank and non-empty string values unchanged.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-isblank-isempty

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Sorry, my bad.  Caught again by the discrepancy between Power Apps and Power Automate. Here's the description of Coalesce in Power Automate.  Notice it specifies that it only works on nulls, not empty strings.  For Power Apps you are correct.

     

    "Return the first non-null value from one or more parameters. Empty strings, empty arrays, and empty objects are not null."

     

    I did try to reproduce your results, but it works fine for me.  Are the labels involved part of a data table or Gallery?  Of just two labels?

  • Community Power Platform Member Profile Picture
    on at

    So from my tests I can't reproduce this issue. I set my second label to Blank(), " " and also didn't add a value, and it worked. Is your label pulling data from a data source?

  • Jooorge Profile Picture
    28 on at

    @Anonymous  Yes, both of the labels have a filtered sum from source. 1st Label there is rows to sum, while there is nothing for second Label. 

     

    I would not want to have to go in all my labels and do an additional If(IsBlank() to change to 0s), curious what the issue is on my end.

  • Verified answer
    Jooorge Profile Picture
    28 on at

    So not sure what the issue was in the Total Sum Label.

     

    I had to add the Coalesce at the individual item labels to fix the issue

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