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 / Rounding numbers and f...
Power Apps
Unanswered

Rounding numbers and fixing error

(0) ShareShare
ReportReport
Posted on by

Hi All, 

 

I'm trying to divide two datacards as per the below and display the result into another one. My first question is how to round the number, where to put the round in the formula. Secondly on the load of the form I get an error saying something like the number can't be divided by 0 but the calculation does work it's just that the data card is expecting a value and doesn't get it until the user has entered some info, how can I resolve this?

 

If(IsBlank(DataCardValue9.Text) && IsBlank(DataCardValue10.Text), "0", (Value(DataCardValue10.Text))/(Value(DataCardValue9.Text)) *100) 

 

thanks

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    If you want the output number to be rounded, this should be your first function. The rest you can then nest into it. The second request can be resolved by adjusting your code slightly. I would add Not() functions to only show the calculated value if both datacards contain information. Something like this:

    If(Not(IsBlank(DataCardValue9.Text)) && Not(IsBlank(DataCardValue10.Text)), Round((Value(DataCardValue10.Text))/(Value(DataCardValue9.Text)) *100), 0), "0")

     

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard