The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
ID | Timestamp | Name | URL |
1 | 29/06/2020 | Page 1 | http://www.web.com/page1 |
2 | 30/06/2020 | Page 1.1 | http://www.web.com/page1 |
3 | 30/06/2020 | Page 2 | http://www.web.com/page2 |
4 | 1/07/2020 | Page 2.1 | http://www.web.com/page2 |
5 | 2/07/2020 | Page 2.2 | http://www.web.com/page2 |
I would like to output the following:
ID | Timestamp | Name | URL | LatestName |
1 | 29/06/2020 | Page 1 | http://www.web.com/page1 | Page 1.1 |
2 | 30/06/2020 | Page 1.1 | http://www.web.com/page1 | Page 1.1 |
3 | 30/06/2020 | Page 2 | http://www.web.com/page2 | Page 2.2 |
4 | 1/07/2020 | Page 2.1 | http://www.web.com/page2 | Page 2.2 |
5 | 2/07/2020 | Page 2.2 | http://www.web.com/page2 | Page 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?
Solved! Go to Solution.
Please try
Column =
MAXX(FILTER('table','table'[URL]=EARLIER('table'[URL])&&'table'[ID]=CALCULATE(MAX('table'[ID]),ALLEXCEPT('table','table'[URL]))),'table'[LatestName])
Proud to be a Super User!
Please try
Column =
MAXX(FILTER('table','table'[URL]=EARLIER('table'[URL])&&'table'[ID]=CALCULATE(MAX('table'[ID]),ALLEXCEPT('table','table'[URL]))),'table'[LatestName])
Proud to be a Super User!
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.