topic Simple formula but I can't figure it out in Building Power Apps
https://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97531#M36214
<P>Okay, I have the names of two tennis players in two text boxes - <STRONG>Name1</STRONG> and <STRONG>Name2</STRONG>. Next to each I have dropdowns for each of their scores - <STRONG>Score1</STRONG> and <STRONG>Score2. </STRONG>All I'm looking to do is automatically put the name of the winner in a third text box based on the higher of the two scores.</P><P> </P><P>I thought the formula was:</P><P><EM>If( Score1.Selected.Value > Score2.Selected.Value, Name1.Text, Name2.Text)</EM></P><P>...but it didn't work.</P><P> </P><P>It would be great if there was a list of Excel formulas translated to PowerApps formulas.</P>Sat, 10 Mar 2018 12:10:39 GMThughrmarks2018-03-10T12:10:39ZSimple formula but I can't figure it out
https://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97531#M36214
<P>Okay, I have the names of two tennis players in two text boxes - <STRONG>Name1</STRONG> and <STRONG>Name2</STRONG>. Next to each I have dropdowns for each of their scores - <STRONG>Score1</STRONG> and <STRONG>Score2. </STRONG>All I'm looking to do is automatically put the name of the winner in a third text box based on the higher of the two scores.</P><P> </P><P>I thought the formula was:</P><P><EM>If( Score1.Selected.Value > Score2.Selected.Value, Name1.Text, Name2.Text)</EM></P><P>...but it didn't work.</P><P> </P><P>It would be great if there was a list of Excel formulas translated to PowerApps formulas.</P>Sat, 10 Mar 2018 12:10:39 GMThttps://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97531#M36214hughrmarks2018-03-10T12:10:39ZRe: Simple formula but I can't figure it out
https://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97532#M36215
<P>You are comparing text values instead of numbers, perhaps your intention is to compare numeric fields. <EM>Score1.Selected.Value </EM>is a text value, you can transform it to numeric like this:</P><P> </P><PRE>Value( Score1.Selected.Value )</PRE><P> </P>Sat, 10 Mar 2018 12:15:52 GMThttps://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97532#M36215bdodu2018-03-10T12:15:52ZRe: Simple formula but I can't figure it out
https://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97533#M36216
<P>Aha! I was close. Thanks for the help - it worked!</P>Sat, 10 Mar 2018 12:34:30 GMThttps://powerusers.microsoft.com/t5/Building-Power-Apps/Simple-formula-but-I-can-t-figure-it-out/m-p/97533#M36216hughrmarks2018-03-10T12:34:30Z