cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Calculate text input +drop down

Hey There,

I would like to have a label that shows the SUM of a numbers and an inches fraction.

For example: 3+15/16=3.9375

So, for that I have a text input (format number) and drop down for the inches fractions with value-value.

BUT... I can't get to sum them together.

I tried to use Value() but it didn't work.

Thanks in advance 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

OK @Anonymous ,

You ideally need to understand what I have done here as you have chosen a rather difficult way of doing what you need

Value(WidIn.Text) + 
With(
   {
      vFract: 
      Find(
         "/",
         WidFrc.Selected.Value
      ),
      vString: WidFrc.Selected.Value
   },
   Value(
      Left(
         vString,
         vFract - 1
      )
   ) / 
   Value(
      Right(
         vString,
         Len(vString) - vFract
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Assuming you have two drop-downs for 15 and 16, you would use something like (using your control name

Value(YourWholeNumber.Text) + (Value(YourFirstFraction.Selected.Value)/Value(Your2ndFraction.Selected.Value))

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Anonymous
Not applicable

@WarrenBelz, thanks for your reply, but I have one drop down for the fractions.

I added 2 pic.

Capture shows the drop down

Capture1 shows the formula and the error I suppose.

 

OK @Anonymous ,

You ideally need to understand what I have done here as you have chosen a rather difficult way of doing what you need

Value(WidIn.Text) + 
With(
   {
      vFract: 
      Find(
         "/",
         WidFrc.Selected.Value
      ),
      vString: WidFrc.Selected.Value
   },
   Value(
      Left(
         vString,
         vFract - 1
      )
   ) / 
   Value(
      Right(
         vString,
         Len(vString) - vFract
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

I'll be glad to know if there is an easier way.

Thanks

Anonymous
Not applicable

It worked perfectly!!!!

@Anonymous ,

I would not have spent 10-15 minutes building a model to test this if there was. You have a text string that you have to "pull apart" to get the two values. The With() statement I used simply saved a whole heap of repetitive code.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,417)