web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Percentage ...
Power Apps
Answered

Power Apps Percentage Updated automatically in slider based on number in the text feld.

(0) ShareShare
ReportReport
Posted on by 105

Hi, 

 

I have 2 Sharepoint lists: one has the target number i need to reach and one shows the count of my number. I have connected these 2 through a lookup. 

Now in Power Apps I have a text input box and a slider. I would like the text input to reflect number count and the slider to update percentage towards target. See an image below. Can you please show me how i can do this? Thank you!! 

 

Sussan_0-1658243601119.png

 

 

Best,

Su

Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at

    Hi @Sussan ,

    [Edit: assuming I interpreted correctly - you want the slide to reflect text input as a percentage of an amount total?]

    If the InputText is a percentage of your total, and your total can be anything (not just 100), then add a Slider and set the Default: property to;

     

    (Value(TextInput.Text)/amountTotal)*100

     

    This is assuming your slider min is 0 and max is 100 (which is the default for a new Slider).  If you allow people to move the slide, then you'll have to reset it every time you want it to reflect the percentage of the value in the textbox, which you can do by putting

     

    Reset(Slider)

     

     on a behaviour or action property somewhere...

    Kind regards,

    RT

  • Sussan Profile Picture
    105 on at

    Hi RK, 

     

    Thanks for the quick response. 

    The value in the text is  number: let's say 20.000. I want the slider to reflect what this means in percentage towards the target i have in my SharePoint list (eg. 100.000). 

     

     

  • RusselThomas Profile Picture
    4,014 on at

    Hi @Sussan ,

    Ok, so the amountTotal value in the example I gave you would be the value you have in your SharePoint list, which you presumably can fetch using a lookup, yes?

    Kind regards,

    Russel

  • Sussan Profile Picture
    105 on at

    Thanks @RusselThomas, I have used a LookUp but i am sure i am missing something because it is not reflecting. I would like the slider to only reflect the number (in percentage) of my Text Input (this is just a number, not a percentage) towards target which is in my Sharepoint list. 

     

  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @Sussan ,

    It might help if you shared your Slider Default: property lookup formula, and perhaps an idea of what the SharePoint list you're fetching it from looks like?

     

    Otherwise if you like we can start a little slower and work towards it - just to make sure there's nothing wrong with the logic.

    Add another text input to your page and rename it to "totalAmountInput".  Set the Default: value to 100 for now.

    If your original text input hasn't got a nice name, call it "portionAmountInput" - if it's already got a nice name, just replace portionAmountInput in my examples with its name.  

    Set your Slider Default: property to;

     

    (Value(portionAmountInput.Text) / Value(totalAmountInput.Text)) * 100

     

    Now, fiddle with the portionAmountInput and change the values anywhere from 0-100.  Does the slider behave as you want it to?

    If so, then change the totalAmountInput to something like 5000.  Fiddle with the portionAmountInput value and again check if the slider works the way you want it to (2500 should place the slider in the middle at 50% when the totalAmountInput is 5000).

    If this is all working, then essentially all you need to do is replace the Value(totalAmountInput.Text) portion of the example with the lookup that fetches the total amount from somewhere.

    To check that this LookUp() formula is working as expected, you can add a label to your screen, then set its Text: property to your lookup function and the label should show you the total number you're looking for.  If not, then either the data isn't there or the LookUp() isn't looking in the right place for it.

    The LookUp() formula should look something like this;

     

    LookUp(source, condition, fieldToReturn)

     

    If it's a text column, then might need to wrap it in a Value() function similar to what I did above with the text inputs.  If it's a number column, you won't have to.

    Let me know how it goes

    RT

     

     

     

  • Sussan Profile Picture
    105 on at

    Thanks very much for your help @RusselThomas  🙂

     

    Have a great day! 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard