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
TheHans
Helper I
Helper I

Mark first occurance of a value as "new"

Hi Guys,

 

I have a table which I update regularly with data coming from Excel. It could happen that I have the same information imported on different dates. I would like to mark the first occurence of a key, see table below.

The imported data is in the columns "Report Date" and "Key" and the column "IsNew" would be calculated by using DAX.

For me it is not clear how I can iterate over all keys and how I find out on which date this key came up for the first time.

 

Any idea how to solve this?

Many thanks in advance.

Hans

 

Report Date    Key    Is New
01.01.2021Ayes
01.01.2021Byes
01.01.2021Cyes
01.01.2021Dyes
18.03.2021Ano
18.03.2021Cno
18.03.2021Eyes
18.03.2021Fyes
10.04.2021Ano
10.04.2021Eno
10.04.2021Gyes
10.04.2021Hyes
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@TheHans , Create a new column like

 

if([Report Date] = minx(filter(Table, [Key] =earlier([Key])),[Report Date]), "Yes", "No")

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@TheHans , Create a new column like

 

if([Report Date] = minx(filter(Table, [Key] =earlier([Key])),[Report Date]), "Yes", "No")

Awesome! It worked. thanks for the quick solution.

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.

Top Solution Authors