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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mussaenda
Super User
Super User

SUM OF AVERAGE

Hello,

 

I just want to get the sum of my average.

as you can see in the photo the total sum of my average is wrong.

 

2019_08_01_17_26_59_Untitled_Power_BI_Desktop.png

 

The ave is the cost of every doc no.

In the measure I am trying to sum the cost of every doc no but getting wrong total.

Here is the link for the power bi report: Power BI test file

 

 

Thank you

 

1 ACCEPTED SOLUTION

hi, @mussaenda 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

and for your case, just try this formula

Measure 3 = 
var _table=SUMMARIZE('Table','Table'[Posting Date].[Month],'Table'[Country Name],'Table'[Destination],'Table'[No_],"_avgsales", AVERAGEX('Table', 'Table'[Unit Cost (LCY)]))
RETURN
SUMX(_table,[_avgsales])

Result:

2.JPG

 

Best Regards,

Lin

Community Support Team _ Lin
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

4 REPLIES 4
Anonymous
Not applicable

Hi @mussaenda ,

 

I used the Quick Measure Like this:

Unit Cost (LCY) average per Destination = 
AVERAGEX(
	KEEPFILTERS(VALUES('Table'[Destination])),
	CALCULATE(SUM('Table'[Unit Cost (LCY)]))
)

My output:

Capture21.PNG

Let me know if this works:

 

Thanks,

Tejaswi

Hi @Anonymous,

 

Thank you for the time.

I tried your solution but it is giving me a wrong total at the end of the column.

 

I need the sum of average.

Average is the  cost of every doc count column.

 

Do you know other ways?

 

hi, @mussaenda 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

and for your case, just try this formula

Measure 3 = 
var _table=SUMMARIZE('Table','Table'[Posting Date].[Month],'Table'[Country Name],'Table'[Destination],'Table'[No_],"_avgsales", AVERAGEX('Table', 'Table'[Unit Cost (LCY)]))
RETURN
SUMX(_table,[_avgsales])

Result:

2.JPG

 

Best Regards,

Lin

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

Than you @v-lili6-msft !!

 

You don't know how much help you did to me.

I was so desparate with this problem.

 

I will surely review the links you gave.

 

Again, thank you so much! You helped me a lot!

You are so great!

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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