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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Active Head Count

Hi Team,

Hope you all are doing well.

Here is my data sample

amitkumar93_0-1653406616218.png

 


I am calculating active headcount by month by this DAX code


ACTIVE HEAD COUNT BY MONTH =
VAR currentmonth = MAX('CALENDAR'[MONTH])
VAR RESULT=
CALCULATE(DISTINCTCOUNT(Sheet1[EID]),FILTER(Sheet1,Sheet1[Hire Month]<=currentmonth && OR(ISBLANK(Sheet1[Resign Month]),Sheet1[Resign Month]>currentmonth)))
Return
RESULT

I am getting correct no by when i am putting Calendar[Month] column in the chart/table.
I want to calculate this by Year, Quarter, Month and Day so that i can show it by Date Hierachy (year - drill down - Quarter - drill down - Month - drill down - day) in same chart.

Can you guys help me achieve this?

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Refer to my blog on the same

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

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

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

My proposed solution will work if you want to drill down only up to the Month level.  If you wish to go upto the Day level, my solution will be inefficient.  Would you be OK in drilling pnly up to the month level? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Ashish,

Thank you for replying.

I am ok with drilling only up to month level.

Thanks

Hi,

I believe Amit has already anwered your question.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Yes,

Thank you for your time 🙂

amitchandak
Super User
Super User

@Anonymous , Refer to my blog on the same

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

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
Anonymous
Not applicable

Hi @amitchandak ,

I went through the blog and looks like it is working for me.

Thank you..

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Users online (2,699)