1 Reply Latest reply on Jun 13, 2016 5:49 PM by Brad Shuel

    Working with soccer data

    Franck van der Sluis

      Hi People,

       

      I have a data warehouse with soccer data. It has many tables, the following is one of them:

      Screen Shot 2016-06-07 at 10.24.21.png

       

      The name of the table is "session". Session contains all games played by soccer clubs, along with their scores.

      A game is played by 2 clubs (1 home, 1 away.). So every game ID exists exactly twice in this table.

       

      How can I make tableau look at the data like this?:

       

      Screen Shot 2016-06-07 at 10.39.38.png

       

      So I want to group by game id, and then distinguish between home and away clubs / scores. I am quite new to tableau, If some one could give me a direction I would be very happy.

       

       

      Kind regards,

       

      Franck

        • 1. Re: Working with soccer data
          Brad Shuel

          Hello Franck,

           

          To answer your question I have attached a workbook.

           

          I created a couple of calculations:

           

          Home Score

           

          If [Home Away] = "Home" then [Score] END

           

          Away Score

           

          If [Home Away] = "Away" then [Score] END

           

          Home or Away Club

           

          If [Home Away] = "Home" then "Home Club"

          ELSE "Away Club"

          END

           

          I then created two sheets and combined the sheets on a dashboard.

           

          Hope it helps!

           

          Brad