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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
thod
Helper I
Helper I

New hires last 12 months

Hi,

I wan't to calculate the distinct number of new hires for the rolling last 12 months, based on a year-month filter the user selects in a slicer.
I have a regular date table, and a subset of the fact table looks like this:

EmpIDStartDateValue
12301-06-20225
12301-06-20224
33301-01-20227
33301-01-20228
11101-01-20232
11101-01-20232
11101-01-20232

 

So if the user selects 2023-May in the slicer from the date table, the number of new hires should be 2 (EmpID 111 and 123). If the user selects 2023-Aug the number of new hires should be 1 (EmpID 111).

Any sugestions?
Br.,
Thomas

3 REPLIES 3
rubayatyasmin
Super User
Super User

Hey, @thod 

 

what date format are you using? dd/mm/yyyy ? 

 

I tried to reproduce your problem. 

 

Result:

My date format is mm/dd/yy

rubayatyasmin_0-1691605973104.png

 

this thread should help

Solved: Rolling 12 Month Headcount - Microsoft Fabric Community

 

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


My calendar table is standard and includes columns such as date (dd-mm-yyyy), year, month, Year-Month.
The start date in my fact table is date (dd-mm-yyyy).
Your measure should not include EmpID 123, when you have selected 2022-Jan, because EmpID 123's start date is 1st June 2022.
Br.,
Thomas

It included because I mentioned my date format is different than yours. I just gave you an idea. 

 

Thanks


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.