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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.