The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
246 | |
119 | |
114 | |
87 | |
70 |