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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
olmil
New Member

Rolling measure missing values

Hi everyone!

 

I searched through the forum and couldn't find the answer to my problem, so I hope you could help me.

 

It's a very simple table that I have so I hope the solution is simple as well.

 

Here is my Sample file .

 

What I'm trying to do is get the information on the number of employees who have left the company within the first three months of joining the company (later I'm dividing all terminated within 3 months of joining with total of hires during the same three months to get a %). The data is updated on a monthly basis.

 

I'm using a rolling measure with DATESINPERIOD, and though I get valid results with category "Company" which repeats every month some values are not showing for category "Department" (not all values repeat each month). The total, however, is correct, but the distribution by department is not (see also pivot table which shows the values I'm expecting for Rolling 3 months hire).

 

olmil_0-1654181524665.png

 

olmil_1-1654181554109.pngolmil_2-1654181577858.png

I appreciate your help!

 

Best,

 

O.

 

2 REPLIES 2
olmil
New Member

Thanks a lot for your reply! However, my measure for number of leaving within three months of joining right now is:

 

Measure = 
CALCULATE(CALCULATE([Sum_termination],DATESINPERIOD('Hire & Termination'[Entry_date],MAX('Hire & Termination'[Entry_date]),-3,MONTH)),DATESINPERIOD('Hire & Termination'[Report_date],MAX('Hire & Termination'[Report_date]),-3,MONTH))

 

because I don't calculate number of leavers for one month, but for 3 rolling months. 

 

However, when I do that, the result that I get for categories above is not correct even if total number is correct. Do you have any idea what I need to change to get the expected values?

amitchandak
Super User
Super User

@olmil , You need employee left within three months of joining

 

then it should be like

measure  =

 

calculate(count(Table[Employee]), filter(Table, not(isblank(Table[Temination Date])) && datediff([Hire Date],Table[Temination Date], month) <=3 ) )

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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