This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hi everyone
I have a table with the effort tracking in man-days of the employees related to the date and I am trying to join this info with their cost, but I need to associate the time of the Holidays to the other projects prorrated to the man-days.
In excel should be like this (example):
Here you have the initial result in power BI and the result applying the measure detailed below
As you can see the result is not correct
Can anyone help me?
Thanks
Solved! Go to Solution.
Hi @MacarenaGB ,
Believe the best option would be to have the holidays out of your table but having that value on your table you should do your measure similar to this one:
Adjusted Cost =
var Holidays_unit_value =
DIVIDE (
CALCULATE (
SUM ( 'Table'[Cost] ),
FILTER ( ALL ( 'Table'[Project Name] ), 'Table'[Project Name] = "Holidays" )
),
(
CALCULATE ( SUM ( 'Table'[Cost] ), ALL ( 'Table'[Project Name] ) )
- CALCULATE (
SUM ( 'Table'[Cost] ),
FILTER ( ALL ( 'Table'[Project Name] ), 'Table'[Project Name] = "Holidays" )
)
)
)
var SalaryCost = DIVIDE(SUM('Table'[Cost]),SUM('Table'[Man-Days]))
Return
COALESCE (
IF (
ISINSCOPE ( 'Table'[Project Name] ),
IF (
SELECTEDVALUE ( 'Table'[Project Name] ) = "Holidays",
BLANK (),
SUM ( 'Table'[Man-Days] ) * SalaryCost
+ (
SUM ( 'Table'[Man-Days] ) * Holidays_unit_value * SalaryCost
)
),
SUM ( 'Table'[Cost] )
),
0
)
See result below:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MacarenaGB ,
Believe the best option would be to have the holidays out of your table but having that value on your table you should do your measure similar to this one:
Adjusted Cost =
var Holidays_unit_value =
DIVIDE (
CALCULATE (
SUM ( 'Table'[Cost] ),
FILTER ( ALL ( 'Table'[Project Name] ), 'Table'[Project Name] = "Holidays" )
),
(
CALCULATE ( SUM ( 'Table'[Cost] ), ALL ( 'Table'[Project Name] ) )
- CALCULATE (
SUM ( 'Table'[Cost] ),
FILTER ( ALL ( 'Table'[Project Name] ), 'Table'[Project Name] = "Holidays" )
)
)
)
var SalaryCost = DIVIDE(SUM('Table'[Cost]),SUM('Table'[Man-Days]))
Return
COALESCE (
IF (
ISINSCOPE ( 'Table'[Project Name] ),
IF (
SELECTEDVALUE ( 'Table'[Project Name] ) = "Holidays",
BLANK (),
SUM ( 'Table'[Man-Days] ) * SalaryCost
+ (
SUM ( 'Table'[Man-Days] ) * Holidays_unit_value * SalaryCost
)
),
SUM ( 'Table'[Cost] )
),
0
)
See result below:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsJoin us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 19 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 19 | |
| 18 |