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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
MaTa
New Member

cost price AVERAGEX function with "date from" and "date until" search

Hi,

I am searching for a possibility to calculate the average cost of a product in relation to a selected period (month and year).

In the data model I get standard purchase price for each item, but only the current one without historical values.

So I try to pick up the purchase price from the PurchaseInvoiceLines.

How can I calculate an average for each item by period selection (month and year), to get all purchase prices from 1st of June 2021 until 30th of June 2021 for example.

What is the solution with a DAX formula to get this done ?

 

 

2 REPLIES 2
MaTa
New Member

Good question. I think a dynamic measure will be the best solution.

Anonymous
Not applicable

Are you asking for a dynamic measure or a calculated column? It's not clear what you're after...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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