Forum Discussion

sanjurk_1506's avatar
sanjurk_1506
Regular Visitor
1 year ago

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.

 

https://we.tl/t-jRp1XukQXe 

 

2 Replies

  • 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)' ) ) )