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

Counting Attrition Data

Hello, 

 

I am attempting to make a trend ahowing attrition data for a rolling 12 month period. My data set includes a "Termination Date" field with the date an employee left the company, and is blank if they are currently still with the company. I had the idea to make a flag for terminations that occurred in each quarter of the year. My idea was to make a flag of "1" if they were terminated during that quarter or a 0 if they were not, and then do a count of the flags to show the number of terminations each quarter. I am trying to use the following expression in Power Query, but it is not calculating like I want and is flagging those with earlier termination dates than just within that quarter:

 

Q1 2022 Termination = IF(ISBLANK('HCData'[Termination Date]),0,IF('HCData'[Termination Date] >= 4/1/2022,1,0))
Does anyone have any guidance as to what my syntax error is here? Thanks in advance!!
1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

If it is Q1, should be >= 20220101 and <20220401, right? And you want to use Power Query? The above should be DAX...Power Query is like this, file attached

Vera_33_0-1653963451577.png

 

View solution in original post

2 REPLIES 2
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

If it is Q1, should be >= 20220101 and <20220401, right? And you want to use Power Query? The above should be DAX...Power Query is like this, file attached

Vera_33_0-1653963451577.png

 

Anonymous
Not applicable

Thank you Vera!! This ssems to have done the trick. I really appreciate the help!

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.