Forum Discussion
Weighted average by month
- 1 year ago
Thank you, pankajnamekar25 , bhanu_gautam , ThxAlot , and Ashish_Mathur , for your responses.
Hi GiaD30,
Please find attached the screenshots and PBIX file, which may help in resolving the issue:
If you find our response helpful, kindly mark it as the accepted solution and give kudos. This will assist other community members facing similar queries.Thank you.
Create a new column for the weighted value: This column will be the product of Column B and Column C.
WeightedValue = [Column B] * [Column C]
Create a new measure for the total sum of Column C by month: This measure will calculate the total sum of Column C for each month.
TotalSumColumnC = CALCULATE(SUM('Table'[Column C]), ALLEXCEPT('Table', 'Table'[Date].[Month]))
Create a new measure for the weighted average by month: This measure will calculate the weighted average using the previously created columns and measures.
WeightedAverage = DIVIDE(SUM('Table'[WeightedValue]), [TotalSumColumnC])