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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
pawelj795
Post Prodigy
Post Prodigy

Create a new table with the newest prices

Hi

I have a table like below, more complicated of course.

ProductPriceCreate Date
A510.05.2021
A730.04.2021
A920.04.2021
A205.03.2021
A406.01.2021
B3,310.05.2021
B2,630.04.2021
B1,920.04.2021
B1,205.03.2021
B0,510.05.2021
C530.04.2021
C320.04.2021
C205.03.2021
C410.05.2021
C930.04.2021
D5 


Now, I want to create another table, based on the above one, with the latest prices for each product.
(SUMMARIZE/SUMMARIZECOLUMNS function I think)
Please, keep in mind, if the date is blank, it should be kept too. (example - product D)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pawelj795 ,

 

Create a column to get max date for each product.

Column = IF(ISBLANK('Table'[Create Date]),BLANK(),MAXX(ALLEXCEPT('Table','Table'[Product]),'Table'[Create Date]))

3.PNG

Then filter the table with date = max date and date = blank.

Table 2 = FILTER('Table','Table'[Create Date]='Table'[Column]||'Table'[Column]=BLANK())

 4.PNG

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @pawelj795 ,

 

Create a column to get max date for each product.

Column = IF(ISBLANK('Table'[Create Date]),BLANK(),MAXX(ALLEXCEPT('Table','Table'[Product]),'Table'[Create Date]))

3.PNG

Then filter the table with date = max date and date = blank.

Table 2 = FILTER('Table','Table'[Create Date]='Table'[Column]||'Table'[Column]=BLANK())

 4.PNG

 

Best Regards,

Jay

Jihwan_Kim
Super User
Super User

Hi, @pawelj795 

Please check the below.

I created it in two steps.

 

The newest price table =
  // creating a new table
GROUPBY (
'Table',
'Table'[Product],
"@latestdate", MAXX ( CURRENTGROUP (), 'Table'[Create Date] )
)
 
Latest Price CC =
// creating a new column
CALCULATE (
SUM ( 'Table'[Price] ),
FILTER (
'Table',
'Table'[Product] = 'The newest price table'[Table_Product]
&& 'Table'[Create Date] = 'The newest price table'[@latestdate]
)
)
 
Picture1.png
 
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@pawelj795 , Try a table like

addcolumns(summarize(Table, Table[Product], "_1", max(Table[Create Date])), "_2", calculate(Max(Table[Price]), filter(Table, Table[Create Date] =_1)))

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

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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