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 / Converting multiple fi...
Power Apps
Answered

Converting multiple fields of text (drop down selections) to calculate a number and display that as a text value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm recreating an old Infopath SharePoint list form in PowerApps and I have 4 fields that the user will select from a drop-down list. Each choice has a numerical value associated with it where High = 2, Med = .8 and Low = .2. As the user makes a selection, I need to display a text value that is a calculation of the High Med and Low combinations.

 

For example:

Impact1 = High (choice)

Impact2 = Low (choice)

Impact3 = Low (choice)

Impact4 = Med (choice)

Total Impact = Med (view only display) that is a calculation of (2+.2+.2+.8)/4 = .8 (Med)

 

Has anyone done something similar or have any suggestions on where to start? Thank you!!!

Categories:
  • Ismael_Novo Profile Picture
    308 on at

    Hi Niki.

    To make simplest formula I recomend to use the WITH formula. You can split the operations to make easy make modifications and understanding. This is a 2 drops example:

     

    With( {
     Drop1: If(Dropdown1.SelectedText.Value = "High"; 2;
     If(Dropdown1.SelectedText.Value = "Med"; 0,8;
     If(Dropdown1.SelectedText.Value = "Low"; 0,2
     )));
     Drop2: If(Dropdown1.SelectedText.Value = "High"; 2;
     If(Dropdown1.SelectedText.Value = "Med"; 0,8;
     If(Dropdown1.SelectedText.Value = "Low"; 0,2
     )))
     }; Drop1 + Drop2)

     

    *Where is Drop1 + Drop2 you could divide or make the operations you want with the vars upside.

     

    Kind regards!

  • Verified answer
    WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @Anonymous ,

    Just to simplify/clarify this a bit and assuming you are not using European syntax (also note SelectedText is deprecated)

    With( 
     {
     Choice1: 
     Switch(
     YourDropdown1.Selected.Value,
     "High",
     2,
     "Med", 
     0.8,
     "Low",
     0.2
     ),
     Choice2: 
     Switch(
     YourDropdown2.Selected.Value,
     "High",
     2,
     "Med", 
     0.8,
     "Low",
     0.2
     ),
     Choice3: 
     Switch(
     YourDropdown3.Selected.Value,
     "High",
     2,
     "Med", 
     0.8,
     "Low",
     0.2
     ),
     Choice4: 
     Switch(
     YourDropdown4.Selected.Value,
     "High",
     2,
     "Med", 
     0.8,
     "Low",
     0.2
     )
     },
     With(
     {wResult: (Choice1 + Choice2 + Choice3 + Choice4) /4 },
     If(
     wResult > 0.8,
     "High",
     wResult > 0.2,
     "Med",
     "Low"
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for the quick response and your solution worked perfectly! 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz I have a follow-up question. How can I write the calculated field value back into the SharePoint list item? When the users view the list in SharePoint, the Total Impact Score field is empty. I need it to show as High, Med or Low. I was reading that I could use the Patch command, but not sure how to do that.

  • Verified answer
    WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @Anonymous ,

    If you put a card on the form for the target field, the formula would be the Default on the Text Control.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    yes, of course! I was trying to make it more difficult than it needed to be 🙂 Thank you for all of your help!!

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard