TO find sum of one column with duplicate values

Hello,

I have three columns in my dataset namely loan_id, type_of_comm and principal_outstanding_amount.
Now, I want to showcase the sum of principal_outstanding_amount, but the problem is due to type_of_comm rows are duplicating. So one loan_id is present 3-4 times as only type_of_comm is different.
I want to find the sum of principal_outstanding_amount .
How can I achieve this?

Hi @nishchay0001

In the Analysis you can create a calculated field that gets the max of your principal outstanding amount grouped by loan_id. An example of similar nature is as follows when I wanted Rostered Hours from my dataset by Date for a Crew member. I used Max as my dataset has multiple rows per crew/per date and the rostered hours is just repeated.
image

When you put the Measure on a visual you can allow it to Sum; meaning you aggregated data across loans then you get the sum of Principal outstanding amount after getting the max at the individual loan_id level
image

Hope this makes sense.