Forum Discussion
SUM OF AVERAGE
- 7 years ago
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/63376Also, 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/547907and 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:
Best Regards,
Lin
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:
Let me know if this works:
Thanks,
Tejaswi
- mussaenda7 years agoCommunity Champion
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?
- v-lili6-msft7 years agoCommunity Support
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/63376Also, 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/547907and 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:
Best Regards,
Lin
- mussaenda7 years agoCommunity Champion
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!