1 Reply Latest reply on Aug 26, 2015 9:18 AM by swaroop.gantela

# How to distinguish tied wins from outright wins in a league

This seems like a simple problem but it has me stumped.

Say you have a table like this, recording wins as Teams A, B and C compete with each other at various locations:

Location

Team A WinTeam B WinTeam C Win
Location W111
Location X100
Location Y011
Location Z101

So at Location A, Teams A, B and C got the same game score and so all achieved a tied win. At Location X Team A won outright, and so on.

I want to have Tableau produce a results table like this:

Team A
Outright Wins
Team A
Tied Wins
Team B
Outright Wins
Team B
Tied Wins
Team C
Outright Wins
Team C
Tied Wins
#Wins120203

The goal is to aggregate wins over all locations. While it's easy to calculate total wins per team, the problem I'm having is coming up with a way of distinguishing Outright Wins from Tied Wins. All the approaches I've tried using calculated fields fail at some aggregation level. Note that I've simplified the problem by leaving many dimensions out of the sample problem, such as game category and year of game.

Any suggestions on how to calculate aggregations by location of outright wins and tied wins would be much appreciated.

--

Jim

• ###### 1. Re: How to distinguish tied wins from outright wins in a league

Jim,

The attached may be a starting point for you.

I first determined by location if the win was outright or tied using:

IF { FIXED [Location]:SUM([Team A Win]+[Team B Win]+[Team C Win])}>1 THEN "Tied"

ELSE "Outright"

END

Then individually count for each team their outrights and their ties.

Not sure how many teams you will have, but this method requires two calculation for each team.

IF [Team A Win]=1 and [Outright/Tied]="Outright" THEN 1 ELSE 0 END

IF [Team A Win]=1 and [Outright/Tied]="Tied" THEN 1 ELSE 0 END

Then once they are all in the table, a Grand Total can be used.