Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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, ...
  • Greg_Deckler's avatar
    Greg_Deckler
    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.