cancel
Showing results for
Did you mean:
Helper I

## Calculating KPI for a date range.

Hello,

KPI: Attrition in % and Number for the selected period. (Refer to 'Calculations' Part for explaination)

Calculation-

Data ->

I just need an approach to do it. Many thanks

1 ACCEPTED SOLUTION
Super User IV

@subho220 - If I understand correctly:

``````Measure Total Leavers =
VAR __Start = <start date>
VAR __End = <end date>
RETURN
COUNTROWS(FILTER('Table',[TerminationDate] >= __Start && [TerminationDate]<=__End))``````

I have a bunch of recipes for this sort of thing in DAX Cookbook in Chapter 7: https://github.com/gdeckler/DAXCookbook

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

3 REPLIES 3
Super User IV

@subho220 , refer my HR blog, see if this can help

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

Proud to be a Super User!

Helper I

Thanks a lot. It is really helpful.

Super User IV

@subho220 - If I understand correctly:

``````Measure Total Leavers =
VAR __Start = <start date>
VAR __End = <end date>
RETURN
COUNTROWS(FILTER('Table',[TerminationDate] >= __Start && [TerminationDate]<=__End))``````

I have a bunch of recipes for this sort of thing in DAX Cookbook in Chapter 7: https://github.com/gdeckler/DAXCookbook

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Announcements

#### Happy New Year from Power BI

This is a must watch for a message from Power BI!