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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Co-Dependent Slider Co...
Power Apps
Answered

Co-Dependent Slider Controls

(0) ShareShare
ReportReport
Posted on by 201

Is there way to make two or more sliders where their values are co-dependent? For example, let's say we have a maximum mix ratio of 20% such that "A" + "B" + "C" Max = 20%.

 

I would like it such that if the user were to set SliderA = 15% and then they start increasing SliderB, SliderA will remain at 15% until SliderB reaches a value greater than 5%, at which point SliderA will automatically start decreasing by each percent that is added to SliderB.

 

As mentioned, I would like this co-dependence to work across multiple sliders ("A", "B" and "C" in this case).

Categories:
  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @AGS94 ,

     

    I'd do it pretty much the way you described it 🙂

    You may be limited by circular references though, so sliders will only update after a change, not during.

    To keep it simple for an explanation, let's just use two sliders - Slider1 and Slider2.  We'll also only move slider1 up proportionately as slider2 moves past a certain value - you'll have to figure out what proportions you want to use, but this base logic should get you started.

    Slider1 OnChange:

    UpdateContext({slider1current: Slider1.Value})

    Slider1 Default:

    If(slider2current > 50, slider1current + (slider2current -slider1current))

    Slider2 OnChange:

    UpdateContext({slider2current: Slider2.Value});
    Reset(Slider1)

    Just repeat for additional sliders and alter the Default property formula according to the proportions you want the slider to change based on other slider values.

    Hope this helps,

    RT

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi,

     

    I was able to create co-dependant sliders by using a timer - idea being that the timer checks the values while you are busy moving the slider instead of waiting for the Final OnChange. These timers are set that as soon as the two values are 20 or above, it slides the other down so that they remain at a max of 20 (you said 20% yeah?)

     

    POC app is attached, hopefully you can make what you need by expanding on this concept.

    Thanks to @RusselThomas for the initial concept, I built mine based off of that idea and then figured out how to make it live update.

     

    Cheers,

    ManCat

  • AGS94 Profile Picture
    201 on at

     

    Thanks to both of you!

     

    RT: I was able to get yours to work.

     

    ManCat: great idea - I will give that a shot!

     

    For anyone else trying to make this happen, following is exactly what I ended up with (My "C" and "D" are RT's "1" and "2", respectively):

     

    SliderC OnChange:

    UpdateContext({ SldCCurrent : SldC.Value })

     

    SliderC Default:

     

    If(SldDCurrent > (SldC.Max-SldCCurrent), (SldC.Max -SldDCurrent),SldCCurrent)

     

     

    SliderD OnChange:

    UpdateContext({ SldDCurrent : SldD.Value });
    Reset(SldC)

     

    SliderD Default:

     

    If(SldCCurrent > (SldC.Max-SldDCurrent), (SldC.Max -SldCCurrent),SldDCurrent)

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard