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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
marculos
Regular Visitor

New Table based on maxdate

Hi, 

 

I am trying to create a table of unique product codes and latest date using "New table" in Power BI.  I need this so I can use the product code in a relationship. 

 

So e.g ProductTable1  

 

AG00001   16/10/2018

AG00001   15/10/2018

AG00001   14/10/2018

AG00002   10/10/2018

AG00002    12/10/2018

 

ProductTableLatest

 

AG00001   16/10/2018

AG00002   12/10/2018

 

If I use SELECTCOLUMNS as below I get 31/12/2018 for all dates.

 

ProductTableLatest = SELECTCOLUMNS(ProductTable1,"LatestDate",MAX(ProductTable1[ProductDate].[Date]), "Serial Number", ProductTable1[SerialNumber])

 

 Appreciate any help !

 

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@marculos Please try this as "New Table"

 

ProductTableLatest = SUMMARIZE(Test12InputCalcTable,Test12InputCalcTable[Product],"Latest",MAX(Test12InputCalcTable[Date]))




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

Proud to be a PBI Community Champion




View solution in original post

3 REPLIES 3
AkhilAshok
Solution Sage
Solution Sage

This should work:

ProductTableLatest =
SUMMARIZECOLUMNS (
    ProductTable1[SerialNumber],
    "LatestDate", MAX ( ProductTable1[ProductDate].[Date] )
)
PattemManohar
Community Champion
Community Champion

@marculos Please try this as "New Table"

 

ProductTableLatest = SUMMARIZE(Test12InputCalcTable,Test12InputCalcTable[Product],"Latest",MAX(Test12InputCalcTable[Date]))




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

Proud to be a PBI Community Champion




wow you guys are fast! many thanks for all your help 🙂 🙂 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors