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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

***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

 

Hi @Anonymous ,

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.