Forum Discussion
Check for value
- 6 years ago
sorry, it was my bad
Column = var _playedYesterday = countrows(filter('Table','Table'[date]=EARLIER('Table'[date])-1 && ('Table'[home]=EARLIER('Table'[away]) || 'Table'[home]=EARLIER('Table'[home])))) return if(_playedYesterday>0,"yes","no")should be correct for back-to-back games for home team
I love sports stats! 🙂
hi Termigez
try a column
Column =
var _playedYesterday = countrows(filter('Table','Table'[date]=EARLIER('Table'[date])-1 && ('Table'[away]=EARLIER('Table'[away]) || 'Table'[home]=EARLIER('Table'[home]))))
return
if(_playedYesterday>0,"yes","no")Hi, it is super close! However right now this formula doesn't tell me whether home team or away team played yesterday. It returns "yes" if one of those teams played yesterday but doesn't specify which one. I would like to verify this condition just for a home team, whether it played yesterday as a home team or away team.
- az386 years agoCommunity Champion
it is exactly what you asked for in the first post.
give me example of desired output, please, to complete solution 🙂
- Termigez6 years agoRegular Visitor
Sorry, I am not a native speaker so maybe I didn't specify my desired outcome well enough.
date home away b2b 17.10 A B no 17.10 C D no 18.10 E D no 18.10 A F yes 18.10 B X yes 19.10 C D no 19.10 F G yes longer example. We don't have rows with date before 17.10 so the formula returns no. Then for 18.10 - for the first row it returns 'no' because E didn't play yesterday. D played yesterday but I am not interested in it (right now your formula returns 'yes' for this row). Second row for 18.10 returns 'yes' because home team A played yesterday as a home team. Third row for 18.10 returns 'yes' because home team B played yesteday as an away team. First row for 19.10 returns 'no' because C didn't play yesterday and I don'y care about an away team D. Second row for 19.10 returns 'yes' because once again home team played yesterday as an away team.
So in a nutshell: I only care for a home team whether it played yesterday in any game (no matter it was home or away game)
- az386 years agoCommunity Champion
sorry, it was my bad
Column = var _playedYesterday = countrows(filter('Table','Table'[date]=EARLIER('Table'[date])-1 && ('Table'[home]=EARLIER('Table'[away]) || 'Table'[home]=EARLIER('Table'[home])))) return if(_playedYesterday>0,"yes","no")should be correct for back-to-back games for home team
I love sports stats! 🙂