10 Replies Latest reply on Mar 20, 2014 10:28 AM by Jesse Johnson

# How can I add counts to views?

For example, I have horse racing data where I have trainer races won. I am filtering on 'finish position' = 1 (first; won the race). I can produce the view 'Trainer Races Won', without any problem. However, I want to add the total number of starts where the 'finish position' can be any value (1 through n; where n = the number of starters in a given race). I want to show 'Races won' compared to 'Races Started'.

Thanks,

Jesse

• ###### 1. Re: How can I add counts to views?

Without seeing your data set I believe the filter is throwing your analysis off.  Try creating a calculated field "winning trainer"

IIF(finish position = 1, "Trainer","")

Then you could compare a count of winning trainers to all trainers.  If you can post a workbook we can take a look.

• ###### 2. Re: How can I add counts to views?

Ben, Thanks for this reply. As a "newbie", I am not familiar with the notation: IIF. What does that mean? How can I post a workbook? Can I simply attach it to this post?

Jesse

• ###### 3. Re: Re: How can I add counts to views?

Ben, I have posted a workbook to Tableau Public. The name of the workbook is BEL_May_2007. My name (in Tableau Public) is 'Starter'.

This workbook shows all the starting horses at Belmont Park during May of 2007. The view is Trainers by Jockeys where the FIN (finish position) = 1.

I want to be able to see, for each trainer and jockey how many total starts there are in the data set. For example, in my data, the trainer named 'Contessa, Gary', shows 14 WINs with 3 different Jockeys:

Arroyo Jr, Norberto (1 win)

Garcia, Alan (12 wins)

Nakatani, Corey (1 win)

What I want to be able to show, in addition to this, is how many total starts did each jockey have for Contessa where the FIN > 1.

So for example, maybe the three jocks (in this example) each had a total of 5, 30 and 3 starts respectively. I would want to show:

Arroyo: 1 win in 5 starts

Garcia: 12 wins in 50 starts

Nakatani: 1 win in 3 starts

Does this make sense?

Can you suggest a way to accomplish this?

Jesse

• ###### 4. Re: How can I add counts to views?

Hi Jesse

You can post the workbook as attachment in your Reply , Just go to the Use advance editor mode( Top most Right of your reply window) and you will find an attachment Icon at the bottom .

Thanks

Karthik

• ###### 5. Re: Re: How can I add counts to views?

Kathik,

Thank you for this tip. I have posted the workbook here. It includes all race starters at Belmont Park for May, 2007.

Jesse

• ###### 6. Re: How can I add counts to views?

Hi Jesse

Are you trying to show something like the below Image . The Orange Color represents Races won , Blue Colour Represents Races Lost(FIN>1)

Thanks

Karthik

• ###### 7. Re: How can I add counts to views?

Karthik,

That's it! Exactly. I was thinking of showing an actual number because in a larger data set the scale will become much larger. But yes, that is it.

OK, so are you going to show me how you did this?

Jesse

Sent from my iPhone

• ###### 8. Re: Re: How can I add counts to views?

Hi Jesse

Here is the workbook

Thanks

Karthik

• ###### 9. Re: How can I add counts to views?

Thank you Karthik.

This is a very big help to me.

Do you have any availability to help me with some visualization? I will be happy to compensate you.

Jesse

• ###### 10. Re: How can I add counts to views?

Karthik,

Just to make sure, here is my email address:

jjjohn@aug10.com

Jesse