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 / Covert Percentage to d...
Power Apps
Unanswered

Covert Percentage to decimal

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I am building a Power App with a form connected to SQL database. I have field in which user enters number as a percentage(like 50 or 50%). I want PowerApps to convert number to decimal(0.5) and then store in SQL Database. Can anyone please guide me how should I do this.

 

Thanks in advance!

Categories:
I have the same question (0)
  • Edwin-Abdalian Profile Picture
    641 on at

    Let's say your form has a datacard called Number_DataCard1, and this datacard has a txtbox inside it called DataCardValue1.

     

    First make sure that DataCardValue1's Format property is set to Number.

    Then Select Number_DataCard1, and set its Update property to DataCardValue1/100 (you need to unlock the advanced properties of this control to be able to edit it)

    Whatever is set in the Update property, is the value that will be patched to your data source.

     

    --------------------------------------------------------------------

    If this post helps, please choose Accept As Solution to help the other members, and give my post a Thumbs Up.

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @techno ,

     

    Do you want to convert 50/50% (you enter) to 0.5 in SQL table? What is the type of that column?

    If you want to enter 50 or 50%, I think it should divide two situation to judge. So please put the following formula to Update property of DataCard(Unlock it first ).

    If(EndsWith(DataCardValue1.Text,"%"),Value(DataCardValue1.Text),DataCardValue1.Text/100)

    Whether you type 50 or 50%, they all be saved at 0.5.

    Hope this helps.

    Best regards,

    Sik

  • techno Profile Picture
    Microsoft Employee on at

    @v-siky-msft  Thanks. I used Format(Text.Number) to convert text to Number. In SQL Table, the type of column is number.

  • techno Profile Picture
    Microsoft Employee on at

    And now, I want to bring the values from the table in a Gallery after filtering and I want to show the value 0.5 from SQl table as agin 50/50%.

     

    Currently, I am using 

    Filter('[dbo].[Sell-InTarget]',Area=varArea,Subsidiary=varSubsidiary,FiscalYearQuarter=varFYQ)

     under 'Items'. 

     

    How should I do that?

  • techno Profile Picture
    Microsoft Employee on at

    Thanks @Edwin-Abdalian. This was helpful. But, I want to let the user enter 50 or 50%.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard