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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Divide monthly sum by value per month

Hello,

 

I have a table of expenses:  Date / Category / Amount

I have a separate table with the average monthly headcount for each month:  Month / Headcount

 

I would like a measure which sums the expenses for a particular month, and divides it by the headcount for same month from the other table to give average expenses per headcount.

 

Ideas?

 

Thank you,

 

Stacey

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can use the following formula:

 

Average Headcount Expenses = 

DIVIDE(SUMX(Expenses, Expenses[Amount]), SUMX(Headcount, Headcount[headcount]))

 

 

As long as you have proper date columns in each table that are linked to a date table, and you use the months as the axis, this formula should do what you need it to do. 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

You can use the following formula:

 

Average Headcount Expenses = 

DIVIDE(SUMX(Expenses, Expenses[Amount]), SUMX(Headcount, Headcount[headcount]))

 

 

As long as you have proper date columns in each table that are linked to a date table, and you use the months as the axis, this formula should do what you need it to do. 

Anonymous
Not applicable

Thank you for your reply, @Anonymous.  When I tried the formula, it divided by the sum of all headcount, rather than the amount per month.  Here are the structures of my tables.  Do I need to change the format of the tables?

 

Thank you,

 

Stacey

 

Headcount.JPGExpense.JPG

Anonymous
Not applicable

I do also have a separate date table which is linked to both the Expenses and Headcount tables.

Anonymous
Not applicable

And you used the months column from your date dimension table as the axis?

Anonymous
Not applicable

That was the problem!  Thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.