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 / Display Negative Value...
Power Automate
Unanswered

Display Negative Values Red in HTML Table

(0) ShareShare
ReportReport
Posted on by

Hi everyone. I built a flow that pulls data from an excel table and returns the data in an HTML table. I have already formatted the number values to display as a currency with negative values in parenthesis. Is there a way to also format negative values in red? 

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,073 on at

    Yes. Use HTML formatting.

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Anonymous ,

    you can use the approach described in this article, the only difference in your use case will be the condition - instead of comparing dates you'll have to compare the number against the -3 value.

  • Community Power Platform Member Profile Picture
    on at

    Hi @tom_riha,

     

    Thanks for the response. The article doesn't specifically apply to what I'm trying to do. Any idea as to what would I add to the below code to make negative value red?

     

    if(empty(item()?['Net']),'$0.00',formatNumber(float(item()?['Net']),'C2'))

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Probably something like below:

    if(less(item()?['Net'],0)), 
     concat('<span style="color:red">', if(empty(item()?['Net']),'$0.00',formatNumber(float(item()?['Net']),'C2')), '</span>'), 
     if(empty(item()?['Net']),'$0.00',formatNumber(float(item()?['Net']),'C2'))
    )

    + the replace(...) in the email body

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