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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
quickbi
Helper I
Helper I

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
v-xinruzhu-msft
Community Support
Community Support

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

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.