Skip to main content

Notifications

Community site session details

Community site session details

Session Id : HipNz1URz8oKcfV2RNffXR
Power Apps - Building Power Apps
Answered

Getting rid of numbers after decimal point

Like (0) ShareShare
ReportReport
Posted on 9 Apr 2020 09:01:30 by 509

Morning

 

I've got gallery which is returning a number from SP list. It's returning the value 6.600000000000000000. I want bring it down to just two numbers after the decimal point (6.60) and have the option to round it up just to 6.

 

On the Text property I've got:

 

"New Total: " & ThisItem.Total  

I came across the following on another thread:

"[$-en-US]#.0")

but don't know where that would fit in the formula?

 

Thanks in advance!

Categories:
  • ArmyTim Profile Picture
    2 on 15 Mar 2023 at 20:35:50
    Re: Getting rid of numbers after decimal point

    I have five blocks with numbers 1-5 in each on my SharePoint list.  My card shows 3.0000000000 as a total I would like a whole number.

    I have copied Value(ThisItem.Value, "en-US") from this forum however, where does it go on my card?  Currently I have Parent.Default.

    Thanks

    Tim

  • timl Profile Picture
    34,961 Super User 2025 Season 1 on 10 Apr 2020 at 08:52:12
    Re: Getting rid of numbers after decimal point

    Hi @darrenfloyd666 

    Just to add to this, if you choose to use the Round function, you can prefix your label with your "New Total: " label like so -

     

    If you want to round to two decimals places, please set the Text property of the Label to following:

    "New Total: " &
    Round(
     Value(ThisItem.Total),
     2
    )

     

    If you want to round up to a whole number, please modify above formula as below:

    "New Total: " &
    Round(
     Value(ThisItem.Total),
     0
    )

     

  • Verified answer
    v-xida-msft Profile Picture
    on 10 Apr 2020 at 07:14:37
    Re: Getting rid of numbers after decimal point

    Hi @darrenfloyd666 ,

    Could you please share a bit more about the "Total" column? Is it a Calculated type field in your SP List?

     

    If the "Total" column is a Calculated type field in your SP List, actually, it is an known issue with the "Calculated" field in SP list. The user @Casey-Lee has faced similar issue with you, please check the response within the following thread:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Calculated-SharePoint-column-giving-13-decimals-when-imported/m-p/399672

     

    If you want to remain two decimals point for your Total number, please set the Text property of the Label to following:

     

    "New Total: " & Round(
     Value(ThisItem.Total),
     2
    )

     

     

    If you want to round up your Total number value to a whole number, please modify above formula as below:

     

    "New Total: " & Round(
     Value(ThisItem.Total),
     0
    )

     

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • timl Profile Picture
    34,961 Super User 2025 Season 1 on 09 Apr 2020 at 09:28:30
    Re: Getting rid of numbers after decimal point

    Hi @darrenfloyd666 

     

    //This will round up to 7
    Text(6.600000000000000000, "#")
    
    //This will display 6.66
    Text(6.600000000000000000, "#.00")
    
    //This will round up to 7 in your gallery
    "New Total: " & Text(ThisItem.Total, "#") 
    
    //This will display 6.66 in your gallery
    "New Total: " & Text(ThisItem.Total, "#.00") 
    

     

  • sutekh Profile Picture
    509 on 09 Apr 2020 at 09:20:45
    Re: Getting rid of numbers after decimal point

    @timlround it up to 7

  • timl Profile Picture
    34,961 Super User 2025 Season 1 on 09 Apr 2020 at 09:17:32
    Re: Getting rid of numbers after decimal point

    Hi @darrenfloyd666 

    Can you clarify what you mean about rounding it up to 6?

    With an input value of 6.6, did you mean that you want to round it up to 7, or do you actually want to round it 'down' to 6?

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard