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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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])))

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])))

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
Super User
Super User

@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


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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