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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Row and Columns

Hi All
Im fairly new here -

Need attrition 

Name       2016       2017      2018     2019  
David         A1          A2          A3          A4
Mike         A1           A2          -              -
LOLO         A1           A2          A3
ETC           A1


what I want to see compare attriton rate between 2017 to 2016, 2018 to 2017   and 2019 to 2018

if this was excel i woud have done index match - to get the answer i want - (columns would be year dates - and following up with if ststement)

but power BI - is another story 

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi udurrani ,

 

According to your description, I create sample data to test the scenario. You can implement your demand following steps below.

 

Firstly, convert the column 2016-2019 to row data like picture below. Named the new column "Year", and change its data type to Whole Number.

 

1.jpg

 

 

 

2.jpg

 

 

 

 

 

 

 

 

 

Then, create measure named Attriton rate to get the attriton rate between years.

 

Attriton rate =

VAR _previous = CALCULATE(SUM(Table1[Value]),FILTER(ALLSELECTED(Table1), 'Table1'[Name]=MAX(Table1[Name])&&Table1[Year] = MAX(Table1[Year]) -1))

VAR _current = CALCULATE(SUM(Table1[Value]),FILTER(ALLSELECTED(Table1),'Table1'[Name]=MAX(Table1[Name])&&Table1[Year] =MAX(Table1[Year])))

return

IF(_previous<>BLANK(),DIVIDE(_current-_previous,_previous,0),BLANK())

 

Choose the table visual to display the result.

 

1.png 

 

 

 

 

 

 

 

 

 

 

 

Here is my test pbix file link: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EWL26RFMgEJFm858qt...

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, thank you for your response
i dont understand value column - and why they have different number

-for example (see diagram below) on the matrix report


i got "ben" appearing all 4 years. therefore  he would have 0 attrition


meanwhile "jon"  appears 2016 and 2017 not in 2018 ,  therefore add 1 in the 2018 column

Name2016201720182019
bena1a2a3a4
jona2a2  
mikea2a2a3 
petera1a1  
rona2a2a3 
pottera2a3  
harrya2a3a4 


ideally i like to have where i can say 'total attrition for 2018 year is 40, whereas 2017 59

Anonymous
Not applicable

Hi its not working


so i got this now

Name     2016   2017   2018  2019     total
Bob          0              0            0           0             0
Mike        0
tom           0            0            0
jerry        0             0
etc          0              0            0          0

* i know BOB started the comp in 2016 and still in 2019
Mike started 2016 - but has left (blank)
Tom left at 2018 (blank)

***i want to summaries by years - like countif/sumif
for example 2017 attrition is (it needs to add the blank as 1)







Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors