Forum Discussion
sanjurk_1506
1 year agoRegular Visitor
Average Patient Visit Each Weekday
Hi,
I would like to calculate the average number of patients attending each weekday. I would like to show this on a bar chart.
Even on a table would be fine. I have been trying to use the DAX formula and its isnt showing it correct.
The below isnt showing up the result properly too
AvgAppointmentsPerDay =
CALCULATE(
AVERAGE(Appointments[Patient ID]),
ALLEXCEPT(Appointments, Appointments[DayOfWeek])
)
Below is how I want the data to be
For Example
September
Saturday - Average No. of Patients is 19
Sunday - Average No. of Patients is 20
I have put the file on we transfer which is avaiable for 7 days. Can someone help me on how to get this right in Power Bi.
2 Replies
- parry2kSuper User
sanjurk_1506 what do you mean by the average number of patients? What you are averaging?
- parry2kSuper User
sanjurk_1506 maybe try this measure, change table and column name as per your model:
Measure = AVERAGEX ( VALUES ( 'Table (2)'[Weekday] ), CALCULATE ( COUNTROWS ( 'Table (2)' ) ) )