3 Replies Latest reply on Oct 20, 2016 7:43 AM by Matt Fischer

    Develop soccer standings dashboard

    alejandro.molina

      I have the following datasource:

         

      GameIDTeam NameGoals
      1Villareal5
      1Celta0
      2Sporting1
      2Valencia2
      3Barcelona4
      3Deportivo0
      4Villareal1
      4Sporting3
      5Barcelona4
      5Valencia2
      6Deportivo2
      6Celta1

       

      I want to have a statistics dashboard like this: 

          

      Team NameMPWDLGFGADif
      Barcelona2200826
      Villareal2101633
      Sporting2101431
      Valencia210145-1
      Deportivo210125-3
      Celta200217-6

       

      Each column will be calculated field. I know the logic but I don'tt know how to implement it in Tableau.

       

      W (Wins):

      For each [Team Name] COUNT([MatchID]) IF( [Goals] (for team A) > [Goals] (for team B)) (Addressing for MatchID)

      L (Losses):

      For each [Team Name] COUNT([MatchID]) IF ( [Goals] (for team A) < [Goals] (for team B)).(Addressing for MatchID)

      D (Draws):

      For each [Team Name] COUNT([MatchID]) IF ( [Goals] (for team A) = [Goals] (for team B)).(Addressing for MatchID)

      MP (Match played):

      For each [Team Name] SUM (W, D, L)

      GF (Goals Favor):

      For each [Team Name], SUM ([Goals]) IF( [Goals] (Team Name) > [Goals] (Opponet Team)) (Addressing for MatchID)

      GF (Goals Against):

      For each [Team Name], SUM ([Goals]) IF( [Goals] (Team Name) < [Goals] (Opponet Team)) (Addressing for MatchID)

       

      Thanks for your collaboration