Forum Discussion

subho220's avatar
subho220
Helper I
5 years ago
Solved

Calculating KPI for a date range.

Hello,

Can you guys please help me in deducing a solution for this ?-

 

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

  • 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

     

3 Replies