Forum Discussion
Help in calculating averages
Hey guys,
Just needed some help with performing calculation on averages. I need to calculate an average for the total and if possible monthly as well. Just wondering how can i actually achieve that, noting my total for each month comes from a measure using counts function.
Right now my data looks like this:
| Assigned to | July 2022 | August 2022 | Total |
| xxx | 3 | 4 | 7 |
- Anonymous3 years ago
Hi Anonymous ,
It looks like that [YearMonth] are separate columns in your table.
You will need to unpivot the table to below format:
Then you could create a measure like below:
measure = calculate(average([value]),filter(allexcept(table,[assigened to]),[attribute]<>"total"))Best Regards,
Jay
9 Replies
- ShauryaMemorable Member
Hi Anonymous,
I don't think you should use count for averages. Here's a way to calculate average for months, let's say January and February in this case and total average.
January Average = CALCULATE(AVERAGE('Table'[Values]),FILTER('Table','Table'[Month]="Jan"))February Average = CALCULATE(AVERAGE('Table'[Values]),FILTER('Table','Table'[Month]="Feb"))Total Average = CALCULATE(AVERAGE('Table'[Values]))Result:
Works for you? Mark this post as a solution if it does!
- AnonymousNot applicable
Hey Shaurya,
Sorry its because of the dataset Im working on, i don't have a column that is showing the total number for each month hence I have to use count of [case reference number] in order to calculate my total number of cases. Hope that clarifies what I am finding.
Regards,
Shawn
- Ashish_MathurSuper User
Hi,
Share data in a format that can be pasted in an MS Excel file.
- AnonymousNot applicable
- Ashish_MathurSuper User
No, it is not. share your raw data table in a format that i can paste in an MS Excel file.
- AnonymousNot applicable
Hi Anonymous ,
It looks like that [YearMonth] are separate columns in your table.
You will need to unpivot the table to below format:
Then you could create a measure like below:
measure = calculate(average([value]),filter(allexcept(table,[assigened to]),[attribute]<>"total"))Best Regards,
Jay