You *think* your search will produce that output? Why not run the search and remove the doubt? To calculate a total, use the sum function. | index=scoreindex
| stats values(Name) as Name, value...
See more...
You *think* your search will produce that output? Why not run the search and remove the doubt? To calculate a total, use the sum function. | index=scoreindex
| stats values(Name) as Name, values(Subject) as Subject, sum(TotalScore) as TotalScore, max(Score1) as Score1, max(Score2) as Score2, max(Score3) as Score3, max(TotalScore) as "Max TotalScore" by Class
| table Class, Name, Subject, TotalScore, Score1, Score2, Score3, "Max TotalScore"