Expand my Community achievements bar.

Calculated Field: formatting a number as currency that is part of a CONCAT

Avatar

Level 2
Question for all you textmode wizards (David, Doug, Tony, Jason...) I have a text-format calculated field that is performing a CONCAT to join some text with a sum. I want the sum formatted as currency with $ and , at the thousands place, and cents after a decmial. I know in views we can use valueformat=currencyStringCurrency. I'm looking for this functionality in a calculated field. Here's what didn't work for formatting the number as currency: TEXT(SUM(Freelancer Agreed Cost,2000),"$ #,##0.00_") where $ is the HTML code for "$". On it's own the TEXT formula also resulted in a blank value: TEXT(2000,"$ #,##0.00_"). So, my guess is that TEXT() is not supported as is not mentioned in"https://support.workfront.com/hc/en-us/articles/217196767-Understanding-Calculated-Data-Expressions" this help article ,. But maybe there's another way? This version works but does not format the sum with a comma in the thousands place and cents after a decimal. CONCAT("Total VO Cost: $",SUM(Freelancer Agreed Cost,2000)) P.S. This is a nice-to-have item, not a necessity. I am curious if numbers can be formatted in calculated fields. Cory Anderson Cisco Systems- Communication Services
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Level 10
Hi Cory, Ehm...I think the sane answer is no, but in theory (assuming Freelancer Agreed Cost is always less than 997999, is greater than -1001, and has no decimals)... CONCAT("Total VO Cost: $" ,LEFT(SUM(Freelancer Agreed Cost,2000) ,LEN(SUM(Freelancer Agreed Cost,2000))-3 ) ,',' ,RIGHT(SUM(Freelancer Agreed Cost,2000),3) ) ...ain't pretty (or tested), but might do the trick. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
And as for the zany with decimals twist... CONCAT("Total VO Cost: $" ,LEFT(SUM(Freelancer Agreed Cost,2000.001) ,LEN(SUM(Freelancer Agreed Cost,2000.001))-7 ) ,',' ,LEFT(RIGHT(SUM(Freelancer Agreed Cost,2000.001),7),6) ) Caveat Emptor. Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 2
Seriously. You're too much! Works like a charm! As long as nobody cares that there's an extra tenth of a cent hiding in there! (and how would anybody know it anyway?) Very good. Thank you! Cory Anderson Cisco Systems- Communication Services

Avatar

Level 10
You're most welcome, Cory. I'm glad it worked -- especially because I didn't test it and did it on my iPhone. However: to your "as long as nobody cares" comment, being of a certain age, I encourage you to consider this sobering movie clip from out of the archives... https://www.youtube.com/watch?v=N7JBXGkBoFc Regards, Doug Doug Den Hoed - AtAppStore Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 10
Thank you Doug for that clip, it made my morning much better. ��