Hey everyone,
I am having some trouble with the With function (placed within a Label) for a test app I am creating. The label is supposed to show monthly car payments based on r: interest rate (inputted from a slider), p: car price (inputted from another label), and y: number of years (inputted from a slider). My formula is as follows:
With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice, y:Slider_YearsSlider, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))
The formula and function seems fine, but the issue I am having is that the label does not update when I change p: car price (from its respective label), or y: number of years (from it's respective slider). When I adjust r: interest rate from it's respective slider, the label updates values live to show the new monthly payment, however when I change p or y, the label does not change. The label will however update if I remove and reinsert "p:Label_TotalPrice" or "y:Slider_YearsSlider" from the With formula, but that is not convenient.
Does anyone have any guidance to fix this so that adjusting either variables will result in the label to update values live?
Solved! Go to Solution.
Nevermind, resolved.
Multiplying each component in the With function by 1 fixed the issue.
With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice*1, y:Slider_YearsSlider*1, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))
Nevermind, resolved.
Multiplying each component in the With function by 1 fixed the issue.
With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice*1, y:Slider_YearsSlider*1, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))
I have not seen this before. You could try setting the label to a variable. Then have a Set statement in the OnChange of the other inputs that has your With statement. That should force things to change when any input changes.
Not very elegant, but it should work
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
45 | |
45 | |
36 | |
35 |
User | Count |
---|---|
260 | |
82 | |
79 | |
69 | |
69 |