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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
quickbi
Helper II
Helper II

Average Cost in totals

Hi all,

 

I'm doing some calculations and one I want to analyze is the averge cost. The Average Cost is a measure:

Coste Unidad = 
DIVIDE([Median Cost],[Revenues Unidades],0)

I create a pivot table view and whe dimensions Customer & Seller are open the calculations are correct: 736 each unit

quickbi_0-1726230283470.png

 


But when I collapsed the average is not an average is a sum of the cost, then is  1472

quickbi_1-1726230393375.png

 


Any idea how could i show the average and not the sum?

Thanks

4 REPLIES 4
Anonymous
Not applicable

Hi @quickbi 

You can try the following measure

Coste Unidad =
VAR a =
    CALCULATE ( [Median Cost], ALLSELECTED ( table ) )
VAR b =
    CALCULATE ( [Revenues Unidades], ALLSELECTED ( table ) )
RETURN
    DIVIDE ( a, b, 0 )

Best Regards!

Yolo Zhu

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

 

Hi,
Thanks for your answer but if I apply this formula I could not filter by article

Is not possible to tell to the table when it resume by total some columns do it by sum and another by average?
Thanks again guys

Anonymous
Not applicable

Hi @quickbi 

Thanks for you quick reply, can you provide some sample data and the output you want so that can provide more suggestion for you.

 

Best Regards!

Yolo Zhu

elitesmitpatel
Solution Supplier
Solution Supplier

Please share a dummy data for easy reference .

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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