cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bubs
Level: Powered On

Help needed with advanced function!

Hello,

 

I am currently working on an app Where I display three values in a drop down list: Expectation Not Met, Expectation Met, Expectation exceeded. I need to be able to display the text but be able to add the values 1,3,5 to the text so I can average out the scores. 

 

Does anyone know a method to be able to assign a number value to text or how to properly find averages from a dropdown?

 

Anything will help. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Help needed with advanced function!

Hi @bubs 

 

You can test with @Pstork1 's method, and there is another choice is you can use Table function.

 

Example:

Dropdown.Items=Table({Name:"Expectation Not Met",score:1}, { Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

(Then  you can use the DataTable or other controls can check your formula expression)

Table.PNG

 

More information:

function-table

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Help needed with advanced function!

Build your dropdown values as a collection using the following:

 

ClearCollect(dropdownvalues,{Name:"Expectation Not Met",score:1},{ Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

 

Bind the dropdown to that collection and set the Value property to Name.  Now you can access the value associated with the name using dropdown1.selected.score



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Help needed with advanced function!

Hi @bubs 

 

You can test with @Pstork1 's method, and there is another choice is you can use Table function.

 

Example:

Dropdown.Items=Table({Name:"Expectation Not Met",score:1}, { Name:"Expectation Met", score:3},{Name:"Expectation exceeded",score:5})

(Then  you can use the DataTable or other controls can check your formula expression)

Table.PNG

 

More information:

function-table

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,952)