Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31122

Power Query - Check if a Text is appearing for the 1st time based on Date/Time column

$
0
0

Hello,

 

I have a database with following columns among many other columns:

- Names; and

- Date (with Time)

 

What I would like to do is to create a custom column where I would like identify if a name is appearing for the 1st time in the database. If so give a value of 1, otherwise make it blank.

 

We need to accomplish this by checking the "Name" in current record, against all other records whihc has a Date/Time, prior to the current record.

 

An example of what I am trying to achieve:

 

Namesss     Date/Time     CusomColumn

Names A     04 Jan 18       Null / 0

Names B     03 Jan 18       1

Names C     02 Jan 18       1

Names A     01 Jan 18       1

Names D     01 Jan 18       Null / 0

Names D     02 Jan 17       Null / 0

Names D     01 Jan 17       1


Viewing all articles
Browse latest Browse all 31122

Trending Articles