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
Community Champion
Community Champion

@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
Community Champion
Community Champion

@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
Community Champion
Community Champion

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,513)