Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi all,
Let me try to explain an issue I have.
I have a SALARY table like this:
| Date | Salary Cost |
| 01-01-2020 | 1110000 |
| 02-01-2020 | 1110000 |
| 03-01-2020 | 1110000 |
| 04-01-2020 | 1110000 |
| 05-01-2020 | 1110000 |
| 06-01-2020 | 1110000 |
| 07-01-2020 | 1110000 |
| 08-01-2020 | 1110000 |
| 09-01-2020 | 1110000 |
| 10-01-2020 | 1110000 |
| 11-01-2020 | 1110000 |
| 12-01-2020 | 1110000 |
| 01-01-2021 | 1110000 |
| 02-01-2021 | 1110000 |
| 03-01-2021 | 1110000 |
Then I have a "Project" table, where I have a measure to calculate the "Total Time Spend" per project. The goal is to divide our Salary for each job.
Then I have a measure calculating "Total Time Spend":
Solved! Go to Solution.
Hi @Anonymous ,
Please use the following formula :
Avg Cost Measure =
VAR _time =
CALCULATE (
SUM ( 'Projects'[Time spend] ),
FILTER (
ALL ( 'Projects' ),
MONTH ( 'Projects'[Date] ) = MONTH ( MAX ( 'Projects'[Date] ) )
)
)
VAR _cost =
CALCULATE (
MAX ( 'Salary'[Salary Cost] ),
FILTER (
'Salary',
MONTH ( 'Salary'[Date] ) = MONTH ( MAX ( 'Projects'[Date] ) )
)
)
RETURN
DIVIDE ( _cost, _time )Measure =
MAX ( 'Projects'[Time spend] ) * [Avg Cost Measure]
The final output is shown below:
Here is the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please use the following formula :
Avg Cost Measure =
VAR _time =
CALCULATE (
SUM ( 'Projects'[Time spend] ),
FILTER (
ALL ( 'Projects' ),
MONTH ( 'Projects'[Date] ) = MONTH ( MAX ( 'Projects'[Date] ) )
)
)
VAR _cost =
CALCULATE (
MAX ( 'Salary'[Salary Cost] ),
FILTER (
'Salary',
MONTH ( 'Salary'[Date] ) = MONTH ( MAX ( 'Projects'[Date] ) )
)
)
RETURN
DIVIDE ( _cost, _time )Measure =
MAX ( 'Projects'[Time spend] ) * [Avg Cost Measure]
The final output is shown below:
Here is the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi again,
I have a test file:
https://www.dropbox.com/s/duym9jwmsgyt5zd/TEST%20Points.pbix?dl=0
I will try to explain again 🙂
We have a "Total Salary" per month, that we use to calculate cost per project we do in our business.
For each project, we have "Time spend" which are counted as minutes.
So what I need is:
1. The total Salary for the month divided by the Total time spend. That should give me 1 number we can use as "Cost pr. point" (in this case minute).
2. Then I want for each project, to calculate the cost.
In the example I provide in this file, you can see that the "Total Cost pr. Point" for February is 11.42.
This number should then be the fixed number I need to multiply the "Time spend" for each project.
But I can not make it work, as it now just shows me the total for each row:
What result are you expecting?
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 42 | |
| 36 | |
| 35 |