Counting Wins in Tableau Desktop

Tyler
4 min readDec 4, 2017

--

Counting wins in Tableau Desktop is a quick way to aggregate success. Because this isn’t exactly quick and easy, here’s a short tutorial on aggregating first place ranking across Tableau’s SuperStore data. As a tableau consulting services business founder, I hope this article helps you learn more about counting wins in Tableau Desktop!

Cool visualization but in a world of split decisions and executives needs, we want to push every visualization into the immediate feedback zone.

How can we make complex simple?

Can you quickly identify who has the most wins? And can you do that if you’re filtering between 5 or 10 different dimensions? Chances are, no you can’t. And expecting your end users to do that, is cruel and unusual punishment.

Because we love our users, let’s debunk how to aggregate this in Tableau, with a few table calculations.

Don’t stress about not knowing this yet, I’ve never met anyone who does this and it took me a bit to figure it out.

We need to build a couple of things in Tableau Desktop first.

  1. X calculation
  2. Y1 calculation
  3. Build the visualization

The X Calculation is:

Whenever you make this calculation and past: Rank_Unique([Profit Ratio],’desc’) — be sure you’re noticing a little blue thing on the bottom right of your calculation.

Don’t run away, I know Table Calculations are hard at the beginning of your Product ramp up. I’m going to make it very easy!

Click it, and open up the dialog box.

Click the drop-down on Compute using: and select region.

Click OK.

Okay, let’s see where you’re at… If you see ‘results are computed along XXXX’, or for whatever you’re counting rank on, then you’re doing it right. Almost done.

Click OK on the calculation, and move on. Don’t use this calculation on the visualization.

Next, what are you count by? In our instance, we are counting by Region.

Paste: window_sum(if [x]=1 then 1 else 0 end)

The previous calculation was named X :-)

Please follow the steps above, and generate your ‘results are computed along category,’ by clicking on the default table calculation hyperlink above the OK button, select what you’re aggregating along.

Next, generate this visualization. We are using YEAR to break up the calculation and demonstrate what Tableau is going to do with your calculation.

Build the Aggregate Wins Visualization

After building x, then y, and then this visualization… You will have a bit of an awkward looking visual. No fear, follow these steps:

  1. Hide two dimensions of the three. If you have 10, 20, 30, go ahead and hide everything except 1.
  2. Hide your header — AKA un-check show header.

For the SuperStore subset, we only have two objects to hide.

Hide 1 more, notice the ‘shot hidden data’ — showing you how to ‘un-hide.’

Now, uncheck Show header.

Work complete. Mix up the Y calculation to count different rank values.

Thanks for checking out this quick tutorial. There’s a lot of ways to skin the cat in Tableau Desktop, and as a Tableau Consulting guru — I enjoy sharing the fun stuff, and making complex requests simple.

Follow me on LinkedIn for a quicker access point to helpful solutions generated working with over 100.

--

--

Tyler

Family and tribe is everything! I ❤️ Whiteboarding and storytelling. https://dev3lop.com/austin-tableau-consulting/ I’m a tableau consultant who helps people.