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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
laurent_rio
Helper I
Helper I

Calculate Total Resign/Active Employee per quarter

Hi,

I get the employee list report by end of quarter, for example Q4 2020 = date of report 31/12/2020. This is my list 

Capture.JPG

 

How to Calculate The Total of resign people in Q4 2020/Active People in Q2020 

 

The answer should be = 3/10

My idea is try to make condition DAX to count 

 

Calculate (Sum(Total resign), Filter(Termination date.(quarter) = Report date.(quarter) & termination date.(year) = Report date year)))

But again i cant figure out to get the correct DAX 

Can anyone help ?

Thanks

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @laurent_rio 

I am not sure about how your data model looks like.

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

I created it without DIM Calendar Table.

 

Picture13.png

 

Resign People in Q4 =
CALCULATE (
COUNTROWS ( VALUES ( Employee[Employee] ) ),
FILTER (
Employee,
QUARTER ( Employee[Resign Date] ) = QUARTER ( Employee[Date] )
)
)
 
 
Active People in Q4 =
CALCULATE (
COUNTROWS ( VALUES ( Employee[Employee] ) ),
FILTER (
Employee,
Employee[Status] = "Active"
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @laurent_rio 

I am not sure about how your data model looks like.

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

I created it without DIM Calendar Table.

 

Picture13.png

 

Resign People in Q4 =
CALCULATE (
COUNTROWS ( VALUES ( Employee[Employee] ) ),
FILTER (
Employee,
QUARTER ( Employee[Resign Date] ) = QUARTER ( Employee[Date] )
)
)
 
 
Active People in Q4 =
CALCULATE (
COUNTROWS ( VALUES ( Employee[Employee] ) ),
FILTER (
Employee,
Employee[Status] = "Active"
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

amitchandak
Super User
Super User

@laurent_rio ,Refer if my blog can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.