Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm having trouble with the DAX formula to generate the average of the counts over a period of time.
As you can see by this screenshot, the AVERAGE comes out to be the same as the COUNT.
This is the formula I'm using:
but, I've tried multiple varations of it:
1.
AVERAGEX(
KEEPFILTERS(VALUES('Incident'[OwnedByTeamAssignedTimeHour])),
(COUNTA('Incident'[OwnedByTeamAssignedTimeHour]))
)
2.
CALCULATE (
DIVIDE ( [Total Tickets], DISTINCTCOUNT ( Calendar[WeekID] ) ),
FILTER (
ALL ( calendar ),
calendar[WeekID]
>= MAX ( calendar[weekID] ) - 12
&& calendar[WeekID] <= MAX ( calendar[WeekID] )
),values(calendar[day])
)
3.
AVERAGEX(
SUMMARIZE(
Incident,
Incident[OwnedByTeamAssignedTimeHour],
"Count",
COUNT('Incident'[OwnedByTeamAssignedTimeHour])
),
[Count]
)
They all just produce the COUNT.
Additional info: I took the DATE/TIME field, and split out the Date and Time, and then I rounded the TIME, so that I could COUNT how many tickets came in during that time, so my data looks like this:
Anyone have an idea of why I'm not able to generate the actual AVERAGE?
Thanks in advance for your help!
RC
Solved! Go to Solution.
OK, so the top visual is correct then? And in the bottom visual, you want to see the AVERAGE per day for each hour for the selected date range in the slicer above? Are those all correct statements?
If those are all correct statements, you could do a COUNTROWS of your calendar table (if your slicer is based upon that) and use that as your denominator.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |