web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show 2 characters afte...
Power Apps
Answered

Show 2 characters after a comma in a string

(0) ShareShare
ReportReport
Posted on by 33

Hi,  i want to remove all digits but two after a comma. Simply put, i want to round down to 2 digits. For example i have a number

 

1234,1234 i want as a result 1234,12.

 

The number varies in length before and after the comma. I would use the simple RoundDown( Function but it is not really working for me. What i come up with works, i think, but is messy.

 

Concatenate(Last(FirstN(Split(Label.Text; ","); 1)).Value;",";Left(Last(FirstN(Split(Label.Text; ","); 2)).Value;2))

 

I wanted to know if there is a more simple solution. Or another workaround for the weird RoundDown behavior.

Categories:
  • abouchaalaBAIT Profile Picture
    932 Moderator on at

    Hello @liingy 

    Here is the expression you need, do not hesitate to use the format data by exemple from the classic designer

     

    slice(YourText, 0, add(indexOf(triggerBody()['text'], ','), 3))

     

    abouchaalaBAIT_0-1705308442174.png

     

    Hope this helps

    ----------------------------------------------------------
    If I have answered your question, please mark your post as Solved. 🆗✔️
    If you like my response, please give it a Thumbs Up. 👍
    You can accept more than one post as a solution.

     

  • liingy Profile Picture
    33 on at

    Where can i find this feature? Looks like Power Automate to me? I am using Power Apps

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @liingy ,

     

    If it's always a number in the Text input, you can get the 2 digits number as follows:

    vjefferni_0-1705309087430.png

    Text(Value(TextInput2.Text,"de-DE"), "#.##","de-DE")

     

    Best regards,

  • Verified answer
    abouchaalaBAIT Profile Picture
    932 Moderator on at

    My bad.

    Here is the powerapps formula

    Left(TextInput2.Text, Find(",", TextInput2.Text) + 2)

     

    abouchaalaBAIT_0-1705309514065.png

    ----------------------------------------------------------
    If I have answered your question, please mark your post as Solved. 🆗✔️
    If you like my response, please give it a Thumbs Up. 👍
    You can accept more than one post as a solution.

  • liingy Profile Picture
    33 on at

    Actually it is not working, it is Rounding the number when the third comma is 5 or above. Why does the text function round it up? I just want to round down to 2 commas and it seems impossible in this app...

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @liingy ,

     

    If you need to round down to 2 digits number, then use a RoundDown function for the number first:

    vjefferni_0-1705311661992.png

    Text(RoundDown(Value(TextInput2.Text,"de-DE"),2), "#.##","de-DE")

     

    Best regards,

  • liingy Profile Picture
    33 on at

    can i not just use RoundDown(Value(Textinput.Text)) then?

  • liingy Profile Picture
    33 on at

    If you use this formula on a string with no comma it omits the last two digits

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard