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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX - Divide Value in Column by the Count of another Column in a separate table

Hi there, 

 

I am attempting to do a simple calculation to understand the number of Keys created per headcount. Headcount values are in a column as below, and the table below shows the Count of these Keys. Therefore I would like to Divide "Count of Key" by Headcount. These columns are in separate tables and the relationship is Many:Many (default) with a Single direction (Headcount table filters Key Table) - which was done by default.

 

MrMED87_0-1606905596251.png

 

 So far all of my attempts have caused the visualisation to fail. Any help is very much appreciated. Thanks

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

@Anonymous 

Your Headcount column is Text.  Change it to Whole Number.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

@Anonymous 

Your Headcount column is Text.  Change it to Whole Number.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thanks - unfortunately i am still struggling. I have merged the query into the same table so its now a single table.

 

DAX is = DIVIDE(COUNT(Table1[Key]),SUM(Table1[Headcount]) 

 

I get the below error:

 

MrMED87_0-1606911076833.png

 

 

amitchandak
Super User
Super User

@Anonymous , difficult to tell, but better to create one or more bridge table and anayze on that.

 

Across common param

new measures = divide([Count of Key],[Headcount]) // Both are measures

 

https://www.seerinteractive.com/blog/join-many-many-power-bi/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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