Forum Discussion
Sum of average columns
Hi,
I am new to Power BI DAX function.
I have a fact table which is already calculate with sum of the count for each month(COUNT_UNIQUE_MTH), for each week (COUNT_UNIQUE_MTW), for each month to date (COUNT_UNIQUE_MTD), for each month (COUNT_UNIQUE_MTH). All of the sum is group by PRODUCT_CAT. At the same, the fact able store the date range.
I am able to show the column values for COUNT_UNIQUE_MTH by PRODUCT_CAT (38205 for PRODUCT_CAT = AA, 518592 for PRODUCT_CAT=BB) from the Lines and Stacked column chart by using the AVERAGE of COUNT_UNIQUE_MTH. However, I am now have an issue to show the total of both PRODUCT_CAT (556797 = 38205 + 518592) in the Lines Values of the chart.
Appreciate your input on how to construct the formula?
Thanks.
3 Replies
- Greg_Deckler
Community Champion
Not entirely certain I am following this but seems like some kind of totals problem. See if this Quick Measure, Measure Totals, The Final Word gets you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907 - v-yuta-msft
Community Support
Anonymous ,
I am able to show the column values for COUNT_UNIQUE_MTH by PRODUCT_CAT (38205 for PRODUCT_CAT = AA, 518592 for PRODUCT_CAT=BB) from the Lines and Stacked column chart by using the AVERAGE of COUNT_UNIQUE_MTH. However, I am now have an issue to show the total of both PRODUCT_CAT (556797 = 38205 + 518592) in the Lines Values of the chart.
Generally, you could convert the measure "COUNT_UNIQUE_MTH" and "PRODUCT_CAT" to calculate column, and then create a measure by simply plus them. If you have other issues, please share some sample data, dax code and expected result.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
It was not working.
I tried to create the measure
MTH_Average = CALCULATE(AVERAGE(UNIQUE_COUNT[COUNT_UNIQUE_MTH])|ALLEXCEPT(UNIQUE_COUNT|UNIQUE_COUNT[MONTH_FIRST_DAY]|UNIQUE_COUNT[PACKAGE_CAT]))it return me the correct average,I create another measureMTH_Total = calculate(SUMx(UNIQUE_COUNT|[MTH_Average]))it give me the wrong total of the average result.