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
PeterL1
Helper I
Helper I

Average Item Cost on Last 5 Invoices

Hi, 

 

I'm struggling to find an answer to an issue that i have.

I am trying to get out the last 5 invoices by supplier down to an itemised level (by date), to calculate an average cost on the item for those last 5 invoices.

The Invoice dates ranks back to 2009, but i cannot just take invoices from say this year as i might not have bought something for 18 months etc.

 

 

This is the Data i have:

 Capture.PNG

 

 

This is the data i would like, by supplier and by item within that supplier.

 

Capture2.PNG

Any help on this would be appreciated.

Thanks

Peter

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi @PeterL1

 

Do you have some sample data that we can cut/paste into a model?  And what are your table names?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark

 

Please see below link for data example.

 

https://www.dropbox.com/l/scl/AACHeYibKkWAnRxJTe5cW6aiJPgsZLUr6Dc

 

Thanks

Peter

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.