Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Daily average per month

I am new to Power BI and am looking for some help.  I am looking to calculate a daily average per person based on # of working days in the month.  My data includes the id, date/time resolved and case#.  So for example I have  id#1 who resolved 30 cases in Sept which had 19 working day for an average of 1.6 and 40 cases in August which had 23 working days for an average of 1.7.  Do I need to create a calendar table?  And what would the formula be?

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

Yes, you would need to create a calendar table,  you can use DAX below and perform the following steps.

1. Create calendar table.

Calender = ADDCOLUMNS (CALENDAR (DATE(2018,1,1), DATE(2018,12,31)),
"DateAsInteger", FORMAT ( [Date], "DDMMYYYY" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "MM/YYYY" ),
"YearMonthShort", FORMAT ( [Date], "mmm/YYYY" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date],2 ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)


2. Create a holiday table.
2.PNG

3. Create the following columns in the calendar table.

Holiday = RELATED(Holiday[Holiday])
Workday = IF(ISBLANK(Calender[Holiday]),IF(Calender[DayOfWeekNumber]<=5,1,0),0)


4. Create relationship among the three tables as below.
1.PNG

5. Create measure in Calendar table and create average measure in your orginal table.

CountWorkdays = CALCULATE(COUNT(Calender[Workday]),Calender[Workday]=1)
average = COUNT(Table1[date resolved])/[CountWorkdays]


6. Create a table visual, and set average to be not blank. For more details, please review attached PBIX file.
1.PNG

Regards,
Lydia

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@Anonymous,

Yes, you would need to create a calendar table,  you can use DAX below and perform the following steps.

1. Create calendar table.

Calender = ADDCOLUMNS (CALENDAR (DATE(2018,1,1), DATE(2018,12,31)),
"DateAsInteger", FORMAT ( [Date], "DDMMYYYY" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "MM/YYYY" ),
"YearMonthShort", FORMAT ( [Date], "mmm/YYYY" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date],2 ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)


2. Create a holiday table.
2.PNG

3. Create the following columns in the calendar table.

Holiday = RELATED(Holiday[Holiday])
Workday = IF(ISBLANK(Calender[Holiday]),IF(Calender[DayOfWeekNumber]<=5,1,0),0)


4. Create relationship among the three tables as below.
1.PNG

5. Create measure in Calendar table and create average measure in your orginal table.

CountWorkdays = CALCULATE(COUNT(Calender[Workday]),Calender[Workday]=1)
average = COUNT(Table1[date resolved])/[CountWorkdays]


6. Create a table visual, and set average to be not blank. For more details, please review attached PBIX file.
1.PNG

Regards,
Lydia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.