cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

bring date Attrition based on headcounts

Hi Lovely People 🙂

I want to calculate ATTRITION- - Only have, 'Report Date' (no start date or end date) and 'Name' (ignoring the other columns)
 

Name

Report date

a

01/01/2016

b

01/01/2016

c

01/01/2016

d

02/01/2016

a

01/01/2017

b

01/01/2017

c

01/01/2017

a

01/01/2018

c

01/01/2018

a

01/01/2019

--- 

I want to see - give me all the attrition number for year 2016/17/18/19 etc



 

2016

2017

2018

2019

total

0

1

2

1


---Logic Approach 


Visual Diagram

Power BI Matrix view

Name

2016

2017

2018

2019

A

1

1

1

1

B

1

1

 

 

C

1

1

1

 

d

1

1

 

 

 

 

 

 

 

To get the above – Power matric Name-row, report date
                                                                      Report Date – Column
                                                                Value – ‘my Measure’

                ‘my Measure’ =      CALCULATE(COUNT(Sheet1[Name]),FILTERS(Sheet1[Name]),DATESBETWEEN(datetable[Date].[Date],MIN(Sheet1[Report Date]),MAX(Sheet1[Report Date])))

2 REPLIES 2
Highlighted
Frequent Visitor

Re: bring date Attrition based on headcounts

***ERROR

So I checked my measure on Matrix view 
 ‘my Measure’ =      CALCULATE(COUNT(Sheet1[Name]),FILTERS(Sheet1[Name]),DATESBETWEEN(datetable[Date].[Date],MIN(Sheet1[Report Date]),MAX(Sheet1[Report Date])))

What it does where name is not in One of the years - it adds Value 1 
for example 

 total Year attrition   
Name2016201720182019
A1111
B1111
C1111
d1111

But when I did individual year in measure

Count2017 =
CALCULATE(COUNTA('Sheet1'[Name]), 'Sheet1'[Year] IN { DATE(2017, 3, 😎 })   ***i get the right value shown on VISUAL DIAGRAM

 

Highlighted
Resident Rockstar
Resident Rockstar

Re: bring date Attrition based on headcounts

Hi @udurrani ,

I still have a little confused about your logic.

If it is convenient, could you share your desired output and describe your logic in more details so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors