}
cancel
Showing results for
Did you mean:
Helper V

## Multiple Count if based on Drop Down selection on Power apps

Hi Can any one pls help me on this, i am new to PowerApps and creating a form on PowerApps which is link from Sharepoint List. as Sharepoint don't have count if function available.

I have drop 3 Dropdown boxes, based on the selection on the 3 dropdowns, 4 column should give the result.

e.g. Count If(Dropdown1 ="Yes"+Dropdown2 ="No"+Dropdown2 ="Yes")/3

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage

Just use parens and do the division:

``(If(dd1.Selected.Value="yes",1,0) + If(dd2.Selected.Value="yes",1,0) + If(dd3.Selected.Value="yes",1,0))/3``

Or, to get it formatted as a percent, you can use the "text" function:

``Text((If(dd1.Selected.Value="yes",1,0) + If(dd2.Selected.Value="yes",1,0) + If(dd3.Selected.Value="yes",1,0))/3*100,"0%")``
5 REPLIES 5
Solution Sage

You want to count how many dropdowns have yes?

``If(dd1.Selected.Value="yes",1,0) + If(dd2.Selected.Value="yes",1,0) + If(dd3.Selected.Value="yes",1,0)``

In the above, each if statement generates a 1 or 0, depending on the value of the dropdown, then it just adds these together.

Helper V

Thanks However i have to take the count of yes then Divide by 3, how will show the value in percent in 4 box depending on the count of Yes.

Solution Sage

Just use parens and do the division:

``(If(dd1.Selected.Value="yes",1,0) + If(dd2.Selected.Value="yes",1,0) + If(dd3.Selected.Value="yes",1,0))/3``

Or, to get it formatted as a percent, you can use the "text" function:

``Text((If(dd1.Selected.Value="yes",1,0) + If(dd2.Selected.Value="yes",1,0) + If(dd3.Selected.Value="yes",1,0))/3*100,"0%")``
Helper V

Thank you so much it solved my purpose.🙂

Anonymous
Not applicable

Hi,

I have tried using this same code, but it has not worked for me.

As you can see below, each different MIR Number info is a different row of data in my SharePoint list. However, within eventhough each of those SharePoint Lists have a different number of dropdowns that say Yes and No, meaning they should all have different numbers. However, as you can see, they all say 1. It seems to use the number of whatever SharePoint data row I was editing in the app. But it should have different numbers for each one.

Not sure why this is, can anyone help?

Thanks in advance for any help.

Announcements