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 / Text Switch with Calcu...
Power Apps
Unanswered

Text Switch with Calculate

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I have a Text Label that takes the value of a dropdown box in a form and assigns it a certain value based on the selection:

 

Text(Switch( ValueCount.Selected.Value, "0-5", 1, "6-50", 2, "51-100", 3, "100+", 5, 0), "0")

 

However, if the dropdown has multiple values, I would like them to be added together. So if "0-5" with a value of 1 is selected and "100+" with a value of 5 is selected, then the text label displays 6 rather than the most recently selected item.

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @JSeymour ,

     

    A DropDown does not allow for multiple selections, but what you can do is to replace it with a ComboBox. 

     

    The set the Text property of the label to:

     

    Sum(
    	ForAll(
    		ComboBox.SelectedItems,
    		Switch(
    			ThisRecord.Value,
    			"0-5",1, 
    			"6-50", 2, 
    			"51-100", 3, 
    			"100+", 5, 
    			0
    		)
    	),
     Value
    )

     

  • JSeymour Profile Picture
    on at

    Ah yes! Sorry I was indeed using a combo-box not a dropdown, my bad. That worked perfectly, thank you for 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

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard