Forum Discussion
average by category
Hello,
How can I calculate the average by variable sub-category and date together?
The sample data is :
| Day | Request-type | request type count | hours used |
| 31-Mar | French | 4 | 23.4 |
| 31-Mar | German | 1 | 5.85 |
Here, I want the average of hours used based on request type i.e. for 31-Mar French, the average should be (23.4/4 = 5.85). By changing the variable hours used into average hours used gives an incorrect value.
Because there are multiple entries of days the average Power BI is calculating is at an overall data level.
I am not able to achieve the desired result by simple calculation or by using DAX formula.
hours_used_today average per Request Type =
AVERAGEX(
KEEPFILTERS(VALUES('Dummy data'[Request Type])),
CALCULATE([hours_used_today]))The data has Request-Type spread across various days.
Can anyone help me with this ?
1 Reply
- Phil_SeamarkMicrosoft Employee
Hi KhyatiBirje
Can you please post a little more data. Perhaps a mockup of what your data looks like so we can get a better understanding of your requirement.