Forum Discussion
Gimmerzz
2 years agoAdvocate I
PowerBi Averaging issue
Hi, I have a table with 2 months worth of data. The average of all the data is 85% however this is based on PowerBi calculating all of the data across both months. Instead I need it to calculate...
- 2 years ago
Hi Gimmerzz,
Assuming you have the following table named tabC:
Year Month Value
2023 Feb 75
2023 Jan 79
2023 Jan 86
2023 Jan 90
2023 Feb 99You can try the fllowing measure to caclulate the average based on your requirements:
averageByMonth = VAR _tab = ADDCOLUMNS( SUMMARIZE( tabC, tabC[Year], tabC[Month]) , "avg", CALCULATE(AVERAGE(tabC[Value])) ) VAR _result = AVERAGEX(_tab, [avg]) RETURN _result - 2 years ago
Hello Gimmerzz,
Can you please try the following:
1. Calculate Monthly Average
Monthly Average = AVERAGE(YourTable[YourPercentageColumn])2. Calculate Average of Monthly Averages
Average of Monthly Averages = AVERAGEX(VALUES(YourTable[MonthColumn]), [Monthly Average])
Sahir_Maharaj
2 years agoSuper User
Hello Gimmerzz,
Can you please try the following:
1. Calculate Monthly Average
Monthly Average = AVERAGE(YourTable[YourPercentageColumn])
2. Calculate Average of Monthly Averages
Average of Monthly Averages = AVERAGEX(VALUES(YourTable[MonthColumn]), [Monthly Average])
Gimmerzz
2 years agoAdvocate I
Excellent! thank you! that's worked and has helped me make some other decisions too,. Very helpful, much appreciated!