Forum Discussion

bw70316's avatar
bw70316
Icon for Helper V rankHelper V
6 years ago
Solved

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. 

 

YearGameTeamOpponentWinLossTieStageRound
20056775 Sabres82 Islanders 1 R16Final
20056782 Islanders75 Sabres1  R16Final
20056475 Sabres82 Islanders1  R16Final
20056482 Islanders75 Sabres 1 R16Final
20056375 Sabres82 Islanders 1 R16Final
20056382 Islanders75 Sabres1  R16Final
20056975 Sabres82 Islanders1  R16Final
20056982 Islanders75 Sabres 1 R16Final
  • 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

  • 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's avatar
      bw70316
      Icon for Helper V rankHelper 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 this

       

      200613196 Panthers06 France 1 R16FinalO396 Panthers06 FranceN/A 
      200612996 Panthers06 France 1 R16FinalO106 France96 PanthersN/A 
      200612906 France96 Panthers1  R16FinalO106 France96 PanthersChampion
      20056882 Islanders75 Sabres 1 R16FinalO675 Sabres82 IslandersN/A 
      20056875 Sabres82 Islanders1  R16FinalO675 Sabres82 IslandersChampion
      20056775 Sabres82 Islanders 1 R16FinalO582 Islanders75 SabresChampion
      20056782 Islanders75 Sabres1  R16FinalO582 Islanders75 SabresN/A 
      20056682 Islanders75 Sabres1  R16FinalO475 Sabres82 IslandersN/A