Need to count occurrence of a missed punch after the 3rd occurrence as 0.5 points.
see table below
Cool virtual table problem. Give this a go:
Count After 3rd Occurrence =
VAR First3 =
FILTER( TOPN( 3, 'Data', 'Data'[Date], 1 ), 'Data'[COMMENT] = "Missed Punch" )
VAR DataMinusFirst3 =
EXCEPT( 'Data', First3 )
VAR Result =
CALCULATE( COUNTROWS( DataMinusFirst3 ), 'Data'[COMMENT] = "Missed Punch" )
RETURN
Result
Total Points After 3rd Occurrence =
VAR First3 =
FILTER( TOPN( 3, 'Data', 'Data'[Date], 1 ), 'Data'[COMMENT] = "Missed Punch" )
VAR DataMinusFirst3 =
EXCEPT( 'Data', First3 )
VAR Result =
CALCULATE(
SUMX( DataMinusFirst3, [Total Points] ),
'Data'[COMMENT] = "Missed Punch"
)
RETURN
Result
I hope this is helpful. Full solution file attached below.
- Brian
eDNA Forum - Count after 3rd Occurrence.pbix (83.3 KB)
P.S. When I first looked at this, I thought it was tallying boxing scoring (“missed punch”), and then looked at the dates and thought “wow, this fight went on FOREVER…”
1 Like
A post was split to a new topic: Second Variant of Scoring after the Third Occurrence