cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jnovelliere
Frequent Visitor

Format SQL fields for HTML Table


Hello,
Can someone assist me with updating a field below with the format expression. Below is my column Max Amount and the output is 56500000 and I need to show $56,500,000.

I tried the below expression but no luck.

if(empty(item()?['maximum_x0020_debt']), '', formatNumber(item()?['maximum_x0020_debt'], '$0,000'))


Current
jnovelliere_0-1662998591752.png

Here is a snip of my output. Max column needs to be $56,500,000.

jnovelliere_1-1662998804866.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
David-
Solution Sage
Solution Sage

Just replace '$0,000' with 'C0','en-us' and you should be all set. This is a good reference of the codes to use with formatNumber: Standard numeric format strings | Microsoft Docs

 

Note, C0 is without any decimal places. So if your value is 11.50 it will round up to $12. If you want to show the decimal places, use C1 or C2 for one or two decimal places.

View solution in original post

3 REPLIES 3
AbdulWahab
Helper V
Helper V

Hi jnovelliere,

 

Here is the solution: Solved: Displaying a number as Currency or Decimal - Power Platform Community (microsoft.com).

 

If I answer your question then please mark it as verified.

 

Let me know if I can provide you with more details.

 

Thanks
Regards,

Abdul Wahab
Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/

 

David-
Solution Sage
Solution Sage

Just replace '$0,000' with 'C0','en-us' and you should be all set. This is a good reference of the codes to use with formatNumber: Standard numeric format strings | Microsoft Docs

 

Note, C0 is without any decimal places. So if your value is 11.50 it will round up to $12. If you want to show the decimal places, use C1 or C2 for one or two decimal places.

jnovelliere
Frequent Visitor

Thanks @David- 🤗

This was exactly what I needed.
I was able to solve with the expression below but went back and adjusted to C0.

if(equals(item()?['maximum_x0020_debt'],null),null,formatnumber(item()?['maximum_x0020_debt'],'$###,###,###'))

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,696)