Forum Discussion
Ratio between two tables
Hi
This is my first post and question, hope someone helps me to resolve my query.
I have two different tables, Table1 (Employee Separations) and Table2 (Headcount). I have imported both tables in Power BI desktop.
In excel I can simply divide the separations with headcount to find the Attrition rate, but here in power BI. I am unable to calculate these things. I want the following result mentioned in last highlighted column.
Anonymous
You can create a Measure:
Attrition = Sum(Separations[Separations])/SUM(HeadCount[HeadCount])
And use it in a table visual
7 Replies
- tringuyenminh92Memorable Member
Hi Anonymous,
In case you had 2 tables (Headcount(Month,Headcount) & Separation(Month,Separation)):
- In Modeling, choose new table by expression:
Data = SUMMARIZE( NATURALINNERJOIN(Headcount,Separations),Headcount[Month],Headcount[Headcount],Separations[Separations])
- Create calculated column for attrition ( this could be achieved by calculated measure as well )
Attrition (%) = DIVIDE(Data[Separations],Data[Headcount])
If this works for you please accept it as solution and also like to give KUDOS.
Best regards
Tri Nguyen- VvelardeCommunity Champion
Anonymous
You can create a Measure:
Attrition = Sum(Separations[Separations])/SUM(HeadCount[HeadCount])
And use it in a table visual