Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Satish_Kumar
Helper V
Helper V

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 DateEntry No_Cust_ Ledger Entry No_Entry TypePosting DateDocument TypeDocument No_AmountAmount (LCY) 
5/14/2008 0:0053229525/13/2008 0:001JV/08/MAY/00003-13483.2-13483.2 
5/14/2008 0:0053829526/24/2008 0:001BRV/APR08/00063-13483.2-13483.2 
5/18/2008 0:0054229525/13/2008 0:001BRV/APR08/00025-11700-11700 
5/18/2008 0:0054429525/13/2008 0:001JV/08/MAY/00003-1783.2-1783.2 
5/18/2008 0:0055029526/24/2008 0:001BRV/APR08/00063-13483.2-13483.2 
5/18/2008 0:0053529525/13/2008 0:001JV/08/MAY/0000313483.213483.2 
5/18/2008 0:0054029526/24/2008 0:001BRV/APR08/0006313483.213483.2 
5/19/2008 0:0054629525/13/2008 0:001JV/08/MAY/000031783.21783.2 
5/19/2008 0:0054829525/13/2008 0:001BRV/APR08/000251170011700 
5/19/2008 0:00153529526/24/2008 0:001BRV/APR08/0006313483.213483.2 
          
1 ACCEPTED SOLUTION

Hi @Satish_Kumar,

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.
1.PNG

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.

View solution in original post

4 REPLIES 4
Baskar
Resident Rockstar
Resident Rockstar

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

@Baskar

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.

 

Hi @Satish_Kumar,

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.
1.PNG

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.
Baskar
Resident Rockstar
Resident Rockstar

Max( Date) 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.