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
Timmo1016
Regular Visitor

Aggregate monthly data into quarterly average

Hello,

 

I am pretty new to powerBI. I am attempting to report on quarterly headcount data. My current table (below) is broken out monthly by regions (I am only able to add Region A here, but there are Regions B, C, and D. Can I somehow upload an excel file here? It does not accept xlxs or csv files). I want to be able to show this quarterly by region on a bar chart (Region A quarterly average for Q1 2022 should be 13394). 

 

I can't seem to figure out how to create this measure. I understand that the numbers in this data are going to always average out to whatever the last month in the quarter is, but this is just initial dummy data. Going forward, the monthly numbers will be changing. 

 

Ideally, I would want this number expressed in 1000s of employees. (I.E. Region A quartely average for 1000s of employees is 13.39) 

 

I was able to do this in tableau relatively easily, so I am sure it's possible in PBI. Any help would be appreciated! 

 

 

DateYearMonthRegion# of Employees
12/31/2021202112A12906
1/31/202220221A13394
2/28/202220222A13394
3/31/202220223A13394
4/30/202220224A14018
5/31/202220225A14018
6/30/202220226A14018
7/31/202220227A14569
8/31/202220228A14569
9/30/202220229A14569
10/31/2022202210A15216
11/30/2022202211A15216
12/31/2022202212A15216
1/31/202320231A15396
2/28/202320232A15396
3/31/202320233A15396
4/30/202320234A15522
5/31/202320235A15522
6/30/202320236A15522
7/31/202320237A15754
8/31/202320238A15754
9/30/202320239A15754
10/31/2023202310A16083
11/30/2023202311A16083
12/31/2023202312A16083
1/31/202420241A16057
2/28/202420242A16057
3/31/202420243A16057
4/30/202420244A16057
5/31/202420245A16057
6/30/202420246A16727
7/31/202420247A16905
8/31/202420248A16905
9/30/202420249A17006
10/22/2024202410A17006
1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @Timmo1016 ,

 

It's simple to produce the required output. First, create a calendar table and establish a relationship with your headcount fact table. Then, perform the average calculation as shown below:

DataNinja777_0-1729695703122.png

I have attached an example pbix file for your reference.

 

Best regards,

View solution in original post

3 REPLIES 3
Selva-Salimi
Super User
Super User

Hi @Timmo1016 

 

As you select the type of your date , in date format you can easily be able to show that column in date hierarchey of year-quarter. as you add this column in x-axis of bar chart, select date hierarchey and remove day and month. and dont forget to expant the visual .

SelvaSalimi_0-1729695861607.png

 

SelvaSalimi_1-1729695897372.png

you can add regions to the legend and for the y-axis you need to write a measure as follows:

measure _avg := var tbl=summarize ( your_table , date , #employees)

return averagex (tbl , #employee) /1000

 

If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly.

 

DataNinja777
Super User
Super User

Hi @Timmo1016 ,

 

It's simple to produce the required output. First, create a calendar table and establish a relationship with your headcount fact table. Then, perform the average calculation as shown below:

DataNinja777_0-1729695703122.png

I have attached an example pbix file for your reference.

 

Best regards,

rajendraongole1
Super User
Super User

Hi @Timmo1016 - I hope in you have seperate date table as like below:

 

create a calculated table as below:

DateTable = CALENDAR(MIN(Employ[Date]), MAX(Employ[Date]))

 

Create a DAX measure that calculates the quarterly average of employees for each region, and formats it in thousands

Quarterly Average =
DIVIDE(
    CALCULATE(AVERAGE(employ[# of Employees]),
    ALLEXCEPT(employ, employ[Region], DateTable[Year], DateTable[Quarter])),
    1000
)

rajendraongole1_0-1729695177441.png

 

 

Go to the Format tab and adjust the axis, data labels, and chart title to make your visualization clearer.You can also add tooltips that show additional details when hovering over the bars.

 

attached pbix file for your reference.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.