cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tianaranjo
Level 8

Count items selected

Challenge:

      I have 4 Dropdowns. All have items populating from a collection.  Additionally, I have added a default "-" to each dropdown. 
      I would like to count 'how many' of the dropboxs are populated with a selection excluding the "-" (desired result shown                image)

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Count items selected

Hi @tianaranjo,

 

Since all the Count functions need to count values from Table, to do this, you will need to add a button control and create a collection before counting. Set the  OnSelect property of the button to:

ClearCollect(C,{Test:Dropdown1.Selected.Value},{Test:Dropdown2.Selected.Value},{Test:Dropdown3.Selected.Value},{Test:Dropdown4.Selected.Value})

 

Use below formula on the Text property of the label control to show the count number:

CountIf(C,Test<>"-")

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Count items selected

Hi @tianaranjo,

 

Since all the Count functions need to count values from Table, to do this, you will need to add a button control and create a collection before counting. Set the  OnSelect property of the button to:

ClearCollect(C,{Test:Dropdown1.Selected.Value},{Test:Dropdown2.Selected.Value},{Test:Dropdown3.Selected.Value},{Test:Dropdown4.Selected.Value})

 

Use below formula on the Text property of the label control to show the count number:

CountIf(C,Test<>"-")

Capture.PNG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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,493)