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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
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.