Forum Discussion
Anonymous
4 years agoNot applicable
Predictions based on past performance
I have a data set containing player performance for the last year, which looks like below. In this sport, assume there are 3 types of matches, so the "Type" indicates which type it is. I've taken X, ...
- 4 years ago
Anonymous Yeah, you'll have syntax errors when you wing it, there was an offending comma. Try:
Measure Total Points = VAR __Player = MAX('Table'[Player]) VAR __Team = MAX('Table'[Team]) VAR __Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Table',[Type]), "__Team",__Team, "__PPM",[Points/Match]), "__FutureGames", MAXX(FILTER('MatchesTableNextYear',[Team]=__Team && [Attribute]=[Type]),[Value]) ), "__Points",[__PPM] * [__FutureGames] ) RETURN SUMX(__Table,[__Points])It's that last comma just above the first line you get the squilly red line under.
Greg_Deckler
Community Champion
4 years agoAnonymous Yeah, you'll have syntax errors when you wing it, there was an offending comma. Try:
Measure Total Points =
VAR __Player = MAX('Table'[Player])
VAR __Team = MAX('Table'[Team])
VAR __Table =
ADDCOLUMNS(
ADDCOLUMNS(
SUMMARIZE('Table',[Type]),
"__Team",__Team,
"__PPM",[Points/Match]),
"__FutureGames", MAXX(FILTER('MatchesTableNextYear',[Team]=__Team && [Attribute]=[Type]),[Value])
),
"__Points",[__PPM] * [__FutureGames]
)
RETURN
SUMX(__Table,[__Points])
It's that last comma just above the first line you get the squilly red line under.
Anonymous
4 years agoNot applicable
Worked perfect, thanks!