cancel
Showing results for
Did you mean:
Member

## How to pic the last date of multiple payment of same Cust Leg Entry No.?

Hi All,

Is there is any code by which i can pick the last payment date of payment date column?

 Payment Date Entry No_ Cust_ Ledger Entry No_ Entry Type Posting Date Document Type Document No_ Amount Amount (LCY) 5/14/2008 0:00 532 295 2 5/13/2008 0:00 1 JV/08/MAY/00003 -13483.2 -13483.2 5/14/2008 0:00 538 295 2 6/24/2008 0:00 1 BRV/APR08/00063 -13483.2 -13483.2 5/18/2008 0:00 542 295 2 5/13/2008 0:00 1 BRV/APR08/00025 -11700 -11700 5/18/2008 0:00 544 295 2 5/13/2008 0:00 1 JV/08/MAY/00003 -1783.2 -1783.2 5/18/2008 0:00 550 295 2 6/24/2008 0:00 1 BRV/APR08/00063 -13483.2 -13483.2 5/18/2008 0:00 535 295 2 5/13/2008 0:00 1 JV/08/MAY/00003 13483.2 13483.2 5/18/2008 0:00 540 295 2 6/24/2008 0:00 1 BRV/APR08/00063 13483.2 13483.2 5/19/2008 0:00 546 295 2 5/13/2008 0:00 1 JV/08/MAY/00003 1783.2 1783.2 5/19/2008 0:00 548 295 2 5/13/2008 0:00 1 BRV/APR08/00025 11700 11700 5/19/2008 0:00 1535 295 2 6/24/2008 0:00 1 BRV/APR08/00063 13483.2 13483.2
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

## Re: How to pic the last date of multiple payment of same Cust Leg Entry No.?

Please check if the following steps return your desired result.

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 Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Super Contributor

## Re: How to pic the last date of multiple payment of same Cust Leg Entry No.?

Max( Date)

Super Contributor

## Re: How to pic the last date of multiple payment of same Cust Leg Entry No.?

If u want nly max date  use MAX , or do u want some other operation pls clarify dude.

Member

## Re: How to pic the last date of multiple payment of same Cust Leg Entry No.?

I have to select the last payment date from the Payment Date Column.

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 ,

If you help me help me out.

Highlighted
Moderator

## Re: How to pic the last date of multiple payment of same Cust Leg Entry No.?

Please check if the following steps return your desired result.

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 Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 117 members 1,393 guests
Recent signins: