Skip to main content

Hi everyone,

 

I am very new to tableau and trying to get my heard around how to recreate what I did in excel in tableau.

 

As a quick bit of background info: I am a sports performance analyst and looking to create more interactive dashboards using Tableau. In particular my focus is on tennis. The dataset used will generally be pretty small (max 250 rows) and as I use Dartfish to gather the raw data the data I work with will all be string format (e.g. server name, 1st serve in, 1st serve out, serve wide, serve middle, etc. As part of a report I would like to continue to show players certain key performance indicators such as 1st serve % (i.e. how many 1st serves they hit in / total number of first serve hit.

 

Based on my data set, in excel this is an example of the formula used to get the answer for the above KPI:

 

=SUM(COUNTIFS(RawDataTable[[#All],[Server]],$C$2,RawDataTable[[#All],[Serve outcome]],"1st serve made")+COUNTIFS(RawDataTable[[#All],[Server]],$C$2,RawDataTable[[#All],[Serve outcome]],"1st serve ace"))/(COUNTIF(RawDataTable[[#All],[Server]],$C$2))

 

$C$2 is the name of a player where $C$3 would contain the name of the opponent. Not sure how or if it is possible to use player names as references in Tableau as would use in excel.

 

Any advice would be much appreciated,

 

Thanks,

 

Marc

10 risposte
  1. 1 mag 2020, 20:36

    Marc,

     

    Here is your calculation.

     

    1st Server Made : COUNT(IIF([Serve outcome] = "1st serve made" OR [Serve outcome] = "1st serve ace", [Serve outcome], NULL))

    1st Serve % : [1st Server Made]/COUNT([Server])

     

    And here is your output

     

    Marc, Here is your calculation.

     

    Attached the workbook for your reference.

     

    Thanks,

    Anand

0/9000