cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User IV
Super User IV

Re: Find the date of the previous occurrence of the id and paste in the new column of that row.

I just checked.  The maximum number of times any Material Code appears is 2.  So my statement above is correct and the formula should return blanks for all Material codes.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Super User IV
Super User IV

Re: Find the date of the previous occurrence of the id and paste in the new column of that row.

This is extremenly confusing and absolutely not what you stated in the original post.  If you want my help, share a small simple exampel and show the expected result for that simple example.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Helper II
Helper II

Re: Find the date of the previous occurrence of the id and paste in the new column of that row.

Sorry about the confusion. 

 

Here is a sample explanation:

 pbi_community2.png

 

The repeated customers are highlighted with a unique colour for each.

When the customer appeared for the second time, his previous date of occurence is stored in the 'Previous Date' column.

Else it will always be blank. 

 

In the original post too, I meant that the first occurence should have the new column as blank, the rest should have the previous occurence date in the the new column, just mentioned it the other way around.

 

 

Highlighted
Super User IV
Super User IV

Re: Find the date of the previous occurrence of the id and paste in the new column of that row.

Hi,

 

Try this calculated column formula

 

=CALCULATE(MAX(Data[Date of Disbursement]),FILTER(Data,Data[Member Code]=EARLIER(Data[Member Code])&&Data[Date of Disbursement]<EARLIER(Data[Date of Disbursement])))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors