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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
victoria_g06
Helper I
Helper I

Need Average DAX for Part Sales but data in table is from Part Inventory table

Hi All, 

 

I'm sure this is quite a simple issue but I am not getting the results I want. 

I have this table for Parts Inventory data, (one shown for example) and I would like to show the average sales (monthly?) 

victoria_g06_0-1718083848924.png

When I add the average dax it unfilters my table and adds three lines per part (The other lines are for other branches)

AverageSales =
AVERAGEX(PartSales_Parts, PartSales_Parts[SaleUnitAmount] * PartSales_Parts[ShippedQuantity])

 

victoria_g06_1-1718083915112.png

Any help would be greatly apreciated! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @victoria_g06 ,

First of all, many thanks to @lbendlin  for your very quick and effective replies.

Based on the description, please try the following dax formula.

AverageSales = 
CALCULATE(
    AVERAGEX(
        PartSales_Parts, 
        PartSales_Parts[SaleUnitAmount] * PartSales_Parts[ShippedQuantity]
    ),
    ALLEXCEPT(PartSales_Parts, PartSales_Parts[PartID])
)

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @victoria_g06 ,

First of all, many thanks to @lbendlin  for your very quick and effective replies.

Based on the description, please try the following dax formula.

AverageSales = 
CALCULATE(
    AVERAGEX(
        PartSales_Parts, 
        PartSales_Parts[SaleUnitAmount] * PartSales_Parts[ShippedQuantity]
    ),
    ALLEXCEPT(PartSales_Parts, PartSales_Parts[PartID])
)

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, 

It works but I have an issue though becuase my data is from the PartsInventory Table, so it wont show the correct figures because the sales table is a different table. 

I will mark is as the solution and keep working on the issue. 

Thank you

victoria_g06
Helper I
Helper I

Hi There, Sorry it wont let me post a html table of data. 

Yes I read that and it wont allow me to post the html table. Please disregard this post. 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.