1. Create a measure named Maxpaymentdate using the following formula.Maxpaymentdate = CALCULATE(MAX(Sheet1[Payment Date]),ALLEXCEPT(Sheet1,Sheet1[Cust_ Ledger Entry No_]))

2. Create a column named Delay using the following formula.Delay = IF([Maxpaymentdate]<Sheet1[Posting Date],DATEDIFF([Maxpaymentdate],Sheet1[Posting Date],DAY),1*DATEDIFF(Sheet1[Posting Date],[Maxpaymentdate],DAY))

3. Create a table visual as follows.

However, if the above steps don't help, please post your expected result here.

Thanks,Lydia Zhang

Community Support Team _ Lydia ZhangIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

See i have a to calculate the delay in payment from the posting date so for this i have to calculate the payment date and for the payment date i have instructed to take the last apymennt date against the payment ,

1. Create a measure named Maxpaymentdate using the following formula.Maxpaymentdate = CALCULATE(MAX(Sheet1[Payment Date]),ALLEXCEPT(Sheet1,Sheet1[Cust_ Ledger Entry No_]))

2. Create a column named Delay using the following formula.Delay = IF([Maxpaymentdate]<Sheet1[Posting Date],DATEDIFF([Maxpaymentdate],Sheet1[Posting Date],DAY),1*DATEDIFF(Sheet1[Posting Date],[Maxpaymentdate],DAY))

3. Create a table visual as follows.

However, if the above steps don't help, please post your expected result here.

Thanks,Lydia Zhang

Community Support Team _ Lydia ZhangIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.