Hello. I am stumped as to why I am receiving duplicates on this TSQL query

Select Distinct

ln.MemberNumber,

ln.LoanNumber,

ac.Balance,

Total_Change= Case When ah.EntryDate BEtween '03/01/2019' AND '03/31/2019' Then SUM(ah.PrincipalAmount)

Else '0'

End,

ac.LoanKey

From AllCalculationLoanSnapshot ac

Join Loan ln

On ln.MembershipKey=ac.MembershipKey AND ln.LoanKey=ac.LoanKey

Join AccountHistory ah

on ah.MembershipKey=ln.MembershipKey AND ah.AccountNumber=ln.LoanNumber

Where

ln.LoanType='5'

Group By

ln.MemberNumber,

ln.LoanNumber,

ac.Balance,

ah.EntryDate,

ac.LoanKey

I am getting this

MemberNumber | LoanNumber | Balance | Total_Change | LoanKey |
---|---|---|---|---|

XX46XX0 | 129 | 3591.62 | -314.49 | 89019 |

XX46XX0 | 129 | 3591.62 | 0.00 | 89019 |

XX46XX0 | 129 | 3591.62 | 62.04 | 89019 |

Why is the Total Change not summing? Thanks.