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
KevinMorneault
Helper II
Helper II

HeadCount

Hi

I would like to know how can i get a headcount base on these criteria

Head Count

1. HeadCount by week for the last 12 weeks

2. HireDate  and Termination Date

 

and  as a Second Part

 

Capacity

 

1.  Total Capacity by week in hours for the last 12 week

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @KevinMorneault ,

 

Can you provide dummy data and expected results? Are you asking a question in the PQ forum, do you want to get the result in Power Query? Generally speaking, it is more convenient to use DAX functions in Power BI Desktop for your needs.

For example,

create a simple measure like

 

Count for the last 12 Weeks =
CALCULATE (
    COUNT ( Table[Column] ),
    DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -84, DAY )
)

 

DATESINPERIOD function (DAX) - DAX | Microsoft Docs

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Vijay_A_Verma
Super User
Super User

Please post your tables without confidential data. Refer to this - How to provide sample data in the Power BI Forum - https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

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.

Top Solution Authors