Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Matching Algorithm in PowerApps? Is it Possible?

Hi all. 

I am required to do a matching algorithm where I need to check the compatibility rate between 2 people. Therefore, the compatibility rate would be dynamic. For example, the compatibility rate for A&B is 75%, but the compatibility rate for A&C is 45%. 

If I use SharePoint as my database, is it possible to do the Matching Algorithm in Power Apps? Any ideas & recommendations would help me a lot!



Super User III
Super User III

Hi @_kikilalaaa 

Are you able to define as a mathematical expression, how you would derive your compatibility rate percentage value between the two people? If the answer is yes, you would most likely be able to write a formula to calculate this.

Community Support
Community Support

Hi @_kikilalaaa ,


Could you please share more details about Matching algorithm in scenario to show us how to calculate the compatibility rate?

Based on what you've described, it's possible to do this, with the ForAll function to implement loops, and with collections and some aggregation functions to calculate the compatibility rates, but we need more detail to provide detailed solution.



Helper IV
Helper IV

@v-siky-msft @timl i have just able to come out with the scenario.


Table below shows data for 3 students. Each student is ranked from 1 to 3 based on certain attribute.




I want to calculate the compatibility rate between the students based on the marks in the column attribute. Basically Student A will be compared with Student B and C, Student B will be compared with Student A and C, Student C will be  compared with student A and B. 


The formula is as follow: 

for each student, stud, in database
attrib1_diff = curr_stud_attrib.attrib1 - stud.attrib1
attrib2_diff = curr_stud_attrib.attrib2 - stud.attrib2
attrib5_diff = curr_stud_attrib.attrib5 - stud.attrib5


incompatibility rate= sqrt( attrib1_diff*attrib1_diff + attrib2_diff*attrib2_diff + ... + attrib5_diff*attrib5_diff)


The incompatibility rate will then be stored in new column in the sharepoint list.


As you can see, this requires looping. Any idea how to do this in Power Apps?

Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (7,723)