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! Learn more

Reply
Pillsbury33
Helper I
Helper I

Dividing two fields and a filter

Hello everyone,

 

I’m hoping someone can help with my question. I am trying to divide two calculations in two separate tables with a visual filter. The logic I am looking for is effectively is to create a card visual that shows the following:

 

Measure = count of incidents [Table 1 Count of incidents] by [Table 1 Site] – this will be the report filter, divided by [Table 2 Sum of employees] for [Table 2 Site].

 

Somehow I need to match the site names from the two fields (they will have the same names) to divide the number of incidents (table 1) by the number of employees for the site (table 2).

 

Another solution that I couldn’t get to work was to add a new column to table 1 with the sum of employees for the table 1 site name.

 

I hope this is enough information to determine a solution. If not let me know what else I need to provide.

Table 1Table 1Table 2Table 2Expected outcomeExpected outcome

Thanks!

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Pillsbury33 ,

 

Firstly, you need to create a relationship between two tables in the model tab if you don't have it.

Then refer to the following DAX:

Measure =
CALCULATE (
    SUM ( 'Table'[Incident] ) / SUM ( 'Table (2)'[employee] ),
    ALLEXCEPT ( 'Table', 'Table'[Site] )
)

Here is the result.

1-1.PNG

Here is my test file for your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Pillsbury33 ,

 

Firstly, you need to create a relationship between two tables in the model tab if you don't have it.

Then refer to the following DAX:

Measure =
CALCULATE (
    SUM ( 'Table'[Incident] ) / SUM ( 'Table (2)'[employee] ),
    ALLEXCEPT ( 'Table', 'Table'[Site] )
)

Here is the result.

1-1.PNG

Here is my test file for your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@Pillsbury33 , Not sure I got. You need to create a common Site table/dimension and join with both tables.

Then you can create % = divide(Sum(Table1[Incident]),Sum(Table2[Employee]))

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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