Forum Discussion

bryson8420's avatar
bryson8420
Copper Contributor
May 24, 2023
Solved

Calculate Payout using Individual and Family Deductibles

I am consulting for a company whose services are similar to an health insurance company, where each person has a deductible before the company begins paying on their medical bills. However, the compa...
  • mtarler's avatar
    mtarler
    May 25, 2023

    bryson8420 OK didn't catch that.  So is that maximum any individual can count toward the family deductible = to the individual deductible or does the 10% they pay on services over that amount also count?  assuming the former I think this will work:

     

    =CompPerc*MAX(
            MIN(SUMIFS($C$1:$C2,$A$1:$A2,$A2,$B$1:$B2,$B2)-Individual,$C2),
            MIN(MAX(REDUCE(0,UNIQUE(FILTER($B$1:$B1,$A$1:$A1=$A2,0)),
                       LAMBDA(p,q,p+MIN(1000,SUMIFS($C$1:$C1,$A$1:$A1,$A2,$B$1:$B1,q))))
                    +$C2-Family,0),$C2),
            0)

    EDIT: I got to wondering how I would have done this 'old school' before LAMBDA and figured I would probably add a couple helper columns.  These helper columns actually help see what is happening so you might consider this option.  I created a column for amount of $ going towards Individual deductible, amount of $ going towards Family deductible, and then resulting payout based on that. 

    $ to IND = IF(C2,MIN(Individual-SUMIFS($F$1:$F1,$A$1:$A1,$A2,$B$1:$B1,$B2),$C2),"")
    
    $ to FAM = IF(C2,MAX(MIN(Family-SUMIFS($F$1:$F1,$A$1:$A1,$A2),$F2),0),"")
    
    Payout   = IF(C2,(C2-MIN(F2:G2))*CompPerc,"")

    See attached.

     

Resources