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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

unit cost of the last product

Hi

 

I want to calculate the cost of the product entered from the latest date. 

 

I want to get the unit amount from the latest date in the cost table. But I couldn't find how to find it with a formula.

 

new coast = CALCULATE([sum maliyet MMM],LASTDATE(coast_2019[InvoiceDate]))111.png
It gives the category totals of the same products with this formula. I want to show the latest unit prices
 

 

Thank you

 

sshot-2392.pngsshot-2394.png

 

 

 

1 ACCEPTED SOLUTION

I think that problem connected with several prices with one date. We can try use

latest price = 
VAR _LastDate = CALCULATE( MAX(coast_2019[InvoiceDate]), ALLEXCEPT(coast_2019, coast_2019[ItemCode]))
VAR _Result = CALCULATE( MAX(coast_2019[coast MMM]), FILTER(coast_2019, coast_2019[InvoiceDate] = _LastDate ))
RETURN
_Result

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

 

Thank you for the answer. It is an excellent feeling for us to have people who help in such a platform.

 

Itemcode P-000009076 code  as in the example, but an expression like 134,911,40 appears.

 

It should be 546.20. I think the Itemcode collects and writes its totals. Can you help me.

 

1408_1.png1408_2.png1408_3.png

1408_4.png

I think that problem connected with several prices with one date. We can try use

latest price = 
VAR _LastDate = CALCULATE( MAX(coast_2019[InvoiceDate]), ALLEXCEPT(coast_2019, coast_2019[ItemCode]))
VAR _Result = CALCULATE( MAX(coast_2019[coast MMM]), FILTER(coast_2019, coast_2019[InvoiceDate] = _LastDate ))
RETURN
_Result

Anonymous
Not applicable

you are great, thank you.

technolog
Super User
Super User

Hi


latest price = 
VAR _lastDate = CALCULATE( MAX(coast_2019[InvoiceDate]), ALLEXCEPT(coast_2019, coast_2019[ItemCode]))
VAR _Result = CALCULATE( SUM(coast_2019[coast MMM]), FILTER(coast_2019, coast_2019[InvoiceDate] = _lastDate))
RETURN
_Result

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.