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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Nabarun1992
Frequent Visitor

PowerBI Attrition Dashboard for Monthly and yearly

Hi All,

 

I am trying to create monthly/Yearly PowerBI attrition. Following is data. 

 

Attrition = (Total No of employee left for month/No of average employee for month)*100

Number of average employee = (no of employee at the start of the month + no of employee at the end of the month)/2

 

I want the output in the desired format

Nabarun1992_0-1681398562363.png

I saw three date columns in the data set: start date, end date, and date. Can you explain why the date column was used and where was the date column derived from?
Ashish_Mathur

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Step into the Query Editor to see the transformation steps which i ran on the dataset.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,
When I put the month-end employees query, it is calculating I one extra employee under each country, not sure why.
Month end employees = CALCULATE([Employee count],DATESBETWEEN('Calendar'[Date],[Date since when data is available],[Date since when data is available]),USERELATIONSHIP('Employee Records'[Hire Date],'Calendar'[Date]))+[Hired till date]-[Left till date]

Hi,

Study my previous file carefully.  If the answers on that file are correct, then the answers on your live file should also be so.  I d not know how else to help you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I did, I have put the calculations same as yours. In the month-end employees, it is giving me one extra count. I'm sure in some way you can help me, if you would like to 🙂

Nabarun1992
Frequent Visitor

Associate IDFull NameHire Date/Rehire DateTermination Date
1Sample, 107/18/201102/01/2022
2Sample, 209/15/2011 
3Sample, 301/01/2008 
4Sample, 401/07/2008 
5Sample, 501/21/2008 
6Sample, 602/20/2008 
7Sample, 703/24/2008 
8Sample, 803/17/2008 
9Sample, 904/09/2008 
10Sample, 1008/25/2008 
11Sample, 1104/03/2009 
12Sample, 1204/20/200903/04/2022
13Sample, 1304/20/2009 
14Sample, 1405/11/2009 
15Sample, 1505/11/2009 
16Sample, 1608/17/2009 
17Sample, 1711/09/2009 
18Sample, 1811/02/2009 
19Sample, 1901/04/2010 
20Sample, 2001/04/2010 
21Sample, 2102/01/2010 
22Sample, 2205/26/2010 
23Sample, 2307/06/2010 
24Sample, 2408/23/2010 
25Sample, 2510/11/2010 
26Sample, 2602/21/201102/01/2022
27Sample, 2703/07/2011 
28Sample, 2808/29/2011 
29Sample, 2908/29/2011 
30Sample, 3009/15/2011 
31Sample, 3109/15/2011 
32Sample, 3210/10/2011 
33Sample, 3311/14/201105/13/2022
34Sample, 3411/07/2011 
35Sample, 3506/01/2014 
36Sample, 3606/01/2014 
37Sample, 3706/15/2009 
38Sample, 3810/14/2013 
39Sample, 3902/09/2009 
40Sample, 4011/16/2009 
41Sample, 4110/17/2008 
42Sample, 4204/12/2010 
43Sample, 4306/01/2010 
44Sample, 4407/17/2006 
45Sample, 4502/21/2011 
46Sample, 4603/07/2011 
47Sample, 4704/11/2011 
48Sample, 4802/14/2007 
49Sample, 4902/09/2007 
50Sample, 5011/19/2016 
51Sample, 5107/11/2022 
52Sample, 5207/05/2011 
53Sample, 5301/16/2014 
54Sample, 5404/26/201904/25/2022
55Sample, 5503/04/2019 
56Sample, 5612/15/2016 
57Sample, 5710/16/2006 
58Sample, 5804/16/2018 
59Sample, 5908/11/202203/08/2023
60Sample, 6002/24/2017 
61Sample, 6105/26/2015 
62Sample, 6203/09/2016 
63Sample, 6307/11/2022 
64Sample, 6404/13/2016 
65Sample, 6503/04/2022 
66Sample, 6611/14/2016 
67Sample, 6711/14/2018 
68Sample, 6804/05/2022 
69Sample, 6908/01/201406/01/2022
70Sample, 7001/03/2017 
71Sample, 7109/15/2008 
72Sample, 7209/21/2016 
73Sample, 7307/09/2012 
74Sample, 7404/02/2012 
75Sample, 7511/30/2022 
76Sample, 7611/30/200411/01/2022
77Sample, 7705/01/2020 
78Sample, 7805/15/2017 
79Sample, 7910/11/202105/10/2022
80Sample, 8009/02/2014 
81Sample, 8112/03/2012 
82Sample, 8208/16/2010 
83Sample, 8308/29/2016 
84Sample, 8410/07/2019 
85Sample, 8512/21/2018 
86Sample, 8606/05/2013 
87Sample, 8708/03/2009 
88Sample, 8801/18/2021 
89Sample, 8901/01/2019 
90Sample, 9011/16/202002/09/2022
91Sample, 9109/05/2019 
92Sample, 9202/18/2019 
93Sample, 9308/07/2000 
94Sample, 9411/23/2020 
95Sample, 9508/21/2017 
96Sample, 9608/06/2018 
97Sample, 9712/17/2018 
98Sample, 9801/04/2016 
99Sample, 9908/01/2002 
100Sample, 10005/07/2018 
101Sample, 10106/10/2019 
102Sample, 10204/07/2019 
103Sample, 10306/20/2017 
104Sample, 10405/15/2017 
105Sample, 10503/01/2017 
106Sample, 10604/15/2019 
107Sample, 10710/01/2018 
108Sample, 10805/07/2018 
109Sample, 10909/30/2019 
110Sample, 11005/14/2021 
111Sample, 11104/18/2019 

@Ashish_Mathur 

v-shex-msft
Community Support
Community Support

Hi @Nabarun1992,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Nabarun1992
Frequent Visitor

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.