Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Solved! Go to Solution.
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.
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.
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
I do also have a separate date table which is linked to both the Expenses and Headcount tables.
And you used the months column from your date dimension table as the axis?
That was the problem! Thank you!
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |