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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
joepcf
New Member

Create a column using the latest value from a table

Hi,

 

Any help you can give on this would be greatly appreciated. 

 

I am looking to create a new column on a table that will show the most recent Name value using the URL. Here is my current dataset: 

 

IDTimestampNameURL
129/06/2020Page 1http://www.web.com/page1
230/06/2020Page 1.1http://www.web.com/page1
330/06/2020Page 2http://www.web.com/page2
41/07/2020Page 2.1http://www.web.com/page2
52/07/2020Page 2.2http://www.web.com/page2

 

I would like to output the following:

 

IDTimestampNameURLLatestName
129/06/2020Page 1http://www.web.com/page1Page 1.1
230/06/2020Page 1.1http://www.web.com/page1Page 1.1
330/06/2020Page 2http://www.web.com/page2Page 2.2
41/07/2020Page 2.1http://www.web.com/page2Page 2.2
52/07/2020Page 2.2http://www.web.com/page2Page 2.2

 

The LatestName column should look for the URLs that match and find the most recent item and use that Name value. Any ideas?

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@joepcf 

Please try

Column = 
MAXX(FILTER('table','table'[URL]=EARLIER('table'[URL])&&'table'[ID]=CALCULATE(MAX('table'[ID]),ALLEXCEPT('table','table'[URL]))),'table'[LatestName])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@joepcf 

Please try

Column = 
MAXX(FILTER('table','table'[URL]=EARLIER('table'[URL])&&'table'[ID]=CALCULATE(MAX('table'[ID]),ALLEXCEPT('table','table'[URL]))),'table'[LatestName])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




That works great - thanks a lot @ryan_mayu 

amitchandak
Super User
Super User

@joepcf , Try as new columns

LatestName =

if(not(containsstring([name],".")) ,[Name]&".1",[Name])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak - thanks for your response.

 

The page names may well be random values - "MY content page", "News article ABC", etc. etc. - so I need to use the URL as the key. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors