Forum Discussion
Anonymous
4 years agoNot applicable
Count Column by Group and filter
I posted before about a similar problem but I need to know how to handle multiple project. I need to know how many times a project goes in and out the " Tech Review" phase. The solution for a ta...
AlexisOlson
4 years agoSuper User
You're very nearly there. All you need to do is add the condition inside the _countNotTechReview you have in the prior variables.
How many times =
VAR _maxIndexOf_ProjectAndStage =
MAXX (
FILTER (
'Table',
'Table'[ProjectId] = EARLIER ( 'Table'[ProjectId] )
&& 'Table'[Stage_Name] = "Tech Review"
),
'Table'[ProjectIndex]
)
VAR _maxIndexOfProject =
MAXX (
FILTER ( 'Table', 'Table'[ProjectId] = EARLIER ( 'Table'[ProjectId] ) ),
'Table'[ProjectIndex]
)
VAR _countNotTechReview =
COUNTROWS (
FILTER (
'Table',
'Table'[ProjectId] = EARLIER ( 'Table'[ProjectId] )
&& 'Table'[ProjectIndex] > EARLIER ( 'Table'[ProjectIndex] )
&& 'Table'[Stage_Name] <> "Tech Review"
)
)
RETURN
IF (
'Table'[Stage_Name] = "Tech Review",
_countNotTechReview - ( _maxIndexOfProject - _maxIndexOf_ProjectAndStage - 1 )
)- Anonymous4 years agoNot applicable
Could you message me directly? I am trying to reply to your comment with an issue that is showing up but it keeps getting removed for spam for some reason.