cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Krishna98
Helper V
Helper V

Formatting Text

i'm having currency field which is having value 1000.89, now how can I format the text label or html text to show value in the following format. 

 

1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Krishna98 

You can try this:

"<sup>$</sup><b>" & 
RoundDown(1000.89, 0) & 
".</b><sup>" & Mod(1000.89, 1)*100 & 
"</sup>"

 You would replace the hard coded 1000.89 values the your list item value.

View solution in original post

5 REPLIES 5
timl
Super User
Super User

Hi @Krishna98 

Some variation of this should work for you.

"<sup>$</sup><b>1000.</b><sup>89</sup>"

timl_0-1602510638998.png

 

hi @timl ,

 

since i'm getting the value from list, how can split the remaining value after the dot

Hi @Krishna98 

You can try this:

"<sup>$</sup><b>" & 
RoundDown(1000.89, 0) & 
".</b><sup>" & Mod(1000.89, 1)*100 & 
"</sup>"

 You would replace the hard coded 1000.89 values the your list item value.

View solution in original post

HI @timl 

 

Thank you, it's working super fine. can you please explain how this works

 

Hi @Krishna98 

  • The HTML sup tag defines superscript text
  • The RoundDown function rounds down to the nearest whole number. We call this rather than the round function because in this example, rounding 1000.89 would return 1001.
  • The Mod function returns the remainder when we divide a number by divisor. We multiply the result of this by 100 to give the whole number (in this example, 89).

Does that help?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,891)