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
erhan_79
Post Prodigy
Post Prodigy

Calculating Last Date 's Price

Hi Dear Community ;

 

i need your kind help to create below formula ;

 

i have table A , which has agreement date per materials for prurchasing ,  and i want to create Table B , rule will be like that 

 

Table B will include only for per material last day's price and it's date as below , as you see i mentioned yelow remarked for table A that ones last day's price and on table B there are only this prices and their dates

 

Thanks in advance dear friends 

 

Capture1.JPG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@erhan_79 ,

Try like

lastnonblankvalue(Table[Date],max(Table([price])))

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

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

do you want last price or do you want max price?

 

th approach is different for either

you are right , i did not mention it @Anonymous 

 

i want last price based on last date 

amitchandak
Super User
Super User

@erhan_79 ,

Try like

lastnonblankvalue(Table[Date],max(Table([price])))

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

thank you @amitchandak  but when itry your formula i got below error , what can be the reason 

 

also for reminding , i want last price based on last date not maximum one infact

 

Capture1.JPG

Greg_Deckler
Community Champion
Community Champion

@erhan_79 - Not clear on whether you want this in a table table or Table visual but it seems like the basics of what you want can be handled by the Lookup Min/Max pattern: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thank you dear @Greg_Deckler  , that one very useful info i will consider it 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.