i have 2 SharePoint connected with power apps as like the below table
fist one on Share point called Targets
| Month | Dep | KPIName | Target | Score |
| Jan | MOPL | TYL | 47% | 35 |
| Jan | MOPL | TYL | 43% | 30 |
| Jan | MOPL | TYL | 38% | 10 |
| Jan | MOPL | TYL | 32% | 0 |
second table called table result
| Month | Dep | Empname | TYL | TYL Result |
| Jan | MOPL | Emp1 | 52.00% | 35.0 |
| Jan | MOPL | Emp2 | 57.00% | 35.0 |
| Jan | MOPL | Emp3 | 64.00% | 35.0 |
| Jan | MOPL | Emp4 | 37.00% | 9.0 |
| Jan | MOPL | Emp5 | 100.00% | 35.0 |
| Jan | MOPL | Emp6 | 58.00% | 35.0 |
the highlighted bule one i used this formula in excel =@IF(H9<=$H$5,$I$5,IF(H9>=$H$2,$I$2,IF(AND(H9<$H$2,H9>=$H$3),TREND($I$2:$I$3,$H$2:$H$3,H9),IF(AND(H9<$H$3,H9>=$H$4),TREND($I$3:$I$4,$H$3:$H$4,H9),IF(AND(H9<$H$4,H9>=$H$5),TREND($I$4:$I$5,$H$4:$H$5,H9))))))
i need to apply the same formula in power aps or SharePoint to get the same result