cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NewBee117
Kudo Collector
Kudo Collector

Formula does not work when value is zero

What to do to get this formula to work when "Value(txt_WeeklyAdjustment.Text)" is zero? It calculates correctly with any other numbers, just not zero. The actual formula = Adjustment: gal_Monthly.Selected.Adjustment + Value(txt_WeeklyAdjustment.Text)

 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Super User
Super User

@NewBee117 

 

You can place following formula for Adjustment:

if(Value(txt_WeeklyAdjustment.Text) > 0,gal_Monthly.Selected.Adjustment + Value(txt_WeeklyAdjustment.Text), gal_Monthly.Selected.Adjustment )

 

Please give a try and let me know if you still have the same issue.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

3 REPLIES 3
rsaikrishna
Super User
Super User

@NewBee117 

 

You can place following formula for Adjustment:

if(Value(txt_WeeklyAdjustment.Text) > 0,gal_Monthly.Selected.Adjustment + Value(txt_WeeklyAdjustment.Text), gal_Monthly.Selected.Adjustment )

 

Please give a try and let me know if you still have the same issue.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

eka24
Super User
Super User

Consider this:

Coalesce(gal_Monthly.Selected.Adjustment) +Coalesce(txt_WeeklyAdjustment.Text)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
NewBee117
Kudo Collector
Kudo Collector

@eka24 your suggestion does not work.

@rsaikrishna I modified your formula, it is now working. Thanks.

 Adjustment: If(
Value(txt_WeeklyAdjustment.Text) <> 0,
gal_Monthly.Selected.Adjustment + Value(txt_WeeklyAdjustment.Text),
gal_Monthly.Selected.Adjustment - gal_Weekly.Selected.Adjustment
)

Btw, the way it treats zero, is it a bug or "By Design?". I like to know the reason if it is "By Design".  🙂

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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