Forum Discussion
New Column For Champion Based on Year
The champion in this case is the 75 Sabres for having attained 4 wins in the Final Round. How do I create a separate column declaring the team with 4 total wins in the final round the champion?
Something like... If(Calculate(Sum(Database[Win]), Database[Round] = "final") = 4 for a given year, then Champion, N/A)
It's how to get that 4 for a given year in there that is given me an issue. Any thoughts? The Chart is below for any reference.
| Year | Game | Team | Opponent | Win | Loss | Tie | Stage | Round |
| 2005 | 67 | 75 Sabres | 82 Islanders | 1 | R16 | Final | ||
| 2005 | 67 | 82 Islanders | 75 Sabres | 1 | R16 | Final | ||
| 2005 | 64 | 75 Sabres | 82 Islanders | 1 | R16 | Final | ||
| 2005 | 64 | 82 Islanders | 75 Sabres | 1 | R16 | Final | ||
| 2005 | 63 | 75 Sabres | 82 Islanders | 1 | R16 | Final | ||
| 2005 | 63 | 82 Islanders | 75 Sabres | 1 | R16 | Final | ||
| 2005 | 69 | 75 Sabres | 82 Islanders | 1 | R16 | Final | ||
| 2005 | 69 | 82 Islanders | 75 Sabres | 1 | R16 | Final |
bw70316 try this measure (NHL Fan) 🏒🏒
Measure = VAR __wins = CALCULATE ( SUM ( Table[Wins] ), ALLEXCEPT ( Table, Table[Team] ), Table[Round] = "Final" ) RETURN IF ( __wins = 4, "Champion", "N/A" )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
4 Replies
- parry2k
Super User
bw70316 try this measure (NHL Fan) 🏒🏒
Measure = VAR __wins = CALCULATE ( SUM ( Table[Wins] ), ALLEXCEPT ( Table, Table[Team] ), Table[Round] = "Final" ) RETURN IF ( __wins = 4, "Champion", "N/A" )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
- bw70316
Helper V
That solution worked, but I'm trying to have one row for champion for each year. Or I could do something like Final Wins - Final Losses where
Final Wins = CALCULATE(Sum(Database[Win]), Database[Round] ="final")and Final Losses = CALCULATE(Sum(Database[Loss]), Database[Round] ="final")and do something like IF(Final Wins> Finals Losses, "Champion", ) but I still need to break it down by year in some fashion for teams that have more final L's in different years. Thanks for taking time to look at this2006 131 96 Panthers 06 France 1 R16 Final O 3 96 Panthers 06 France N/A 2006 129 96 Panthers 06 France 1 R16 Final O 1 06 France 96 Panthers N/A 2006 129 06 France 96 Panthers 1 R16 Final O 1 06 France 96 Panthers Champion 2005 68 82 Islanders 75 Sabres 1 R16 Final O 6 75 Sabres 82 Islanders N/A 2005 68 75 Sabres 82 Islanders 1 R16 Final O 6 75 Sabres 82 Islanders Champion 2005 67 75 Sabres 82 Islanders 1 R16 Final O 5 82 Islanders 75 Sabres Champion 2005 67 82 Islanders 75 Sabres 1 R16 Final O 5 82 Islanders 75 Sabres N/A 2005 66 82 Islanders 75 Sabres 1 R16 Final O 4 75 Sabres 82 Islanders N/A