cancel
Showing results for
Did you mean:
Memorable Member

## Slider Control w/ Fractional Inches?

Hello,

I'm trying to make a slider that has whole numbers and 1/16" increments.

Example:

- User moves slider and selects 45 3/16" (Forty five and three sixteenth inches).

I'm thinking of using a Switch() statement that maps decimal to fractional inches.

I have two labels, one for the whole number and one for the fractional number. The fractional number is set to the Switch statement below.

Something like:

``````Switch(
Value(Concatenate(".", Last(Split(Slider1.Value, ".")).Value)) / 16,
.0625, "1/16",
.125, "1/8",
.1875, "3/16",
.250, "1/4"
)``````

But this doesn't seem to work. The slider seems to jump to only the whole numbers. The fractional label never renders.

Has anyone attempted this?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

The logic in your formula is incorrect. Please try below formula and set max number of the slider to 1600:

``Text(Slider1.Value/16,"0")&" "&Switch(Last(Split(Text(Slider1.Value/16),".")).Value,"0","","0625","1/16","125","1/8","1875","3/16","250","1/4","3125","5/16","375","3/8","4375","7/16","5","1/2","5625","9/16","625","5/8","6875","11/16","75","3/4","8125","13/16","875","7/8","9375","15/16")``

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

5 REPLIES 5
Memorable Member

Closer with this:

But the slider jumps more than the fractions listed. Like jumps by 3/4"...strange.

Community Support

The logic in your formula is incorrect. Please try below formula and set max number of the slider to 1600:

``Text(Slider1.Value/16,"0")&" "&Switch(Last(Split(Text(Slider1.Value/16),".")).Value,"0","","0625","1/16","125","1/8","1875","3/16","250","1/4","3125","5/16","375","3/8","4375","7/16","5","1/2","5625","9/16","625","5/8","6875","11/16","75","3/4","8125","13/16","875","7/8","9375","15/16")``

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Memorable Member

Hi @v-jefferni ,

Thank you for the solution. I will test it out. I will be dynamically setting the Min/Max of the Slider.

Can you tell me about the Max value of 1600? Is it required?

Community Support

Just because the default max number is 100. According to your need, if the max number showing in the Label is 50, multiply 50 with 16 which is 800 as max number of the slider.

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Memorable Member

Ah, ok. So Max inches * 16, Min inches * 16. That makes sense to me.

Here is the working code for anyone else that needs it:

``````Concatenate(
Text(Slider1.Value / 16, "0"),
Switch(
Value(Concatenate(".", Last(Split(Slider1.Value / 16, ".")).Value)),
.0625, " 1/16",
.125, " 1/8",
.1875, " 3/16",
.250, " 1/4",
.3125, " 5/16",
.375, " 3/8",
.4375, " 7/16",
.5, " 1/2",
.5625, " 9/16",
.625, " 5/8",
.6875, " 11/16",
.75, " 3/4",
.8125, " 13/16",
.875, " 7/8",
.9375, " 15/16"
)
)``````

Thank you @v-jefferni .

Announcements

#### Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

#### Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp