Forum Discussion
0 if Not started
- Anonymous1 year ago
Hi AllanBerces ,
You're right, using Plan Hrs = 0 to decide if a task has started doesn't always work, especially if work begins early without planned hours.
So instead of checking Plan Hrs, we should only return 0 in the Earned column if no actual work has been recorded yet.
Here’s an updated measure that does just that:
Earned = VAR EarnedCalc = CALCULATE ( SUM ( 'Table'[Earned] ), FILTER ( ALL ( 'Table' ), 'Table'[Progress Date] = EARLIER ( 'Tabl02'[PlanDate] ) && 'Table'[Location] = EARLIER ( 'Tabl02'[TaskNo] ) && 'Table'[Mode] = EARLIER ( 'Tabl02'[A -Mode] ) ) ) RETURN IF ( ISBLANK(EarnedCalc), 0, EarnedCalc )This will show 0 only if no Earned hours are found. If any work is done, it will show the actual value.
If the issue still persists after doing the above things, please provide sample data as mentioned by Ashish_Excel .
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
Hi AllanBerces ,
You're right, using Plan Hrs = 0 to decide if a task has started doesn't always work, especially if work begins early without planned hours.
So instead of checking Plan Hrs, we should only return 0 in the Earned column if no actual work has been recorded yet.
Here’s an updated measure that does just that:
Earned =
VAR EarnedCalc =
CALCULATE (
SUM ( 'Table'[Earned] ),
FILTER (
ALL ( 'Table' ),
'Table'[Progress Date] = EARLIER ( 'Tabl02'[PlanDate] ) &&
'Table'[Location] = EARLIER ( 'Tabl02'[TaskNo] ) &&
'Table'[Mode] = EARLIER ( 'Tabl02'[A -Mode] )
)
)
RETURN
IF (
ISBLANK(EarnedCalc),
0,
EarnedCalc
)
This will show 0 only if no Earned hours are found. If any work is done, it will show the actual value.
If the issue still persists after doing the above things, please provide sample data as mentioned by Ashish_Excel .
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thankyou.
Hi @AllanBerces ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.