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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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.

 

 

Untitled.png

 

 

 

1 ACCEPTED SOLUTION

@Anonymous

 

You can create a Measure:

 

Attrition = Sum(Separations[Separations])/SUM(HeadCount[HeadCount])

And use it in a table visual 




Lima - Peru

View solution in original post

7 REPLIES 7
tringuyenminh92
Memorable Member
Memorable 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])

 

 

Screenshot 2017-01-16 21.11.35.png

 

 

If this works for you please accept it as solution and also like to give KUDOS.

Best regards
Tri Nguyen

@Anonymous

 

You can create a Measure:

 

Attrition = Sum(Separations[Separations])/SUM(HeadCount[HeadCount])

And use it in a table visual 




Lima - Peru
Anonymous
Not applicable

Thank you Vvelarde it worked for me... 🙂 i was just missing a single bracket to close the first argument....

Anonymous
Not applicable

This is the simple example what i want to do... first i want to calculate the table 1(Separations) Names, then table2(headcount) Names. once i get the result like 5 separations and 5 headcounts. then i would like to make a ratio of 5 / 5 = 1.

 

Untitled22.png

Anonymous
Not applicable

i am unable to sum because i am counting a areas, so can i use divide measue with count/CountA?

Also I would like to add on top of what @Vvelarde mentioned that there is relationship between botht those tables on a common field.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

There is only "month" is common in both tables. can i make a relationship with the help of months?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.