8 Replies Latest reply on Dec 15, 2012 12:50 PM by Joe Mako

# How to show the number of players at a particular level?

I'm working with data from a social game.  I've got a distinct count of players in the row shelf and MAX(level) in the column shelf.  The resulting view, of course, is a single data point at the total number of players and the highest level that any of those players has achieved (32 in this case).

This makes sense to me, but what I'm after is to see a bar chart of the count of players at each level from 1 to 32 that represents the maximum level that those players achieved.  I'm definitely a Tableau newbie - any ideas?

Thanks!  Unfortunately I can't post a copy of my workbook for confidentiality reasons.  If it helps to parse out some data to make a small sample file to better illustrate what I'm after, please let me know and I will do so.

• ###### 1. Re: How to show the number of players at a particular level?

You can place [level] as a discrete (blue) pill on the column and then countd on the rows (or vice versa). The easiest way to to get [level] as discrete is to drag it over with the right mouse button, then release and choose discrete.

• ###### 2. Re: How to show the number of players at a particular level?

Thanks for the reply Alex.  When I make MAX(level) discrete, I get a single bar with "32" underneath, and it goes up to the count of all users in the rows side.  I'd like 32 separate bars, where each bar represents a single level and the height of the bar is the number of users that have that level as their maximum level.  Please let me know if you need more info.  Thanks!

• ###### 3. Re: How to show the number of players at a particular level?

Redrag it over and choose no aggregation. You don't want the max in there

• ###### 4. Re: How to show the number of players at a particular level?

I've got it so that the [level] is a blue pill and is discrete - now all the levels are separated out individually, but Tableau is totaling every user that has ever been level 1, 2, 3, etc. instead of totaling only the users for whom the level is their maximum ever level.  So, the bar for level 1 is showing all users, when it should only show the users for whom level 1 is the highest level they ever got to.  I'd like each bar to only total the users that reached that level as their maximum level.

This is why I thought the MAX[level] was necessary.  Any ideas for how to achieve the above?

• ###### 5. Re: How to show the number of players at a particular level?

You'll need to mock up some data if the solution below does not work.

• ###### 6. Re: How to show the number of players at a particular level?

If your list looks like this:

 Player ID Level A 3 A 5 A 5 A 4 A 5 B 5 B 8 B 5 B 8 B 5 B 7 B 4 B 8 C 2 C 4 C 3 C 3 C 1 C 3 C 2 C 4

Then you could use a calc like this with the partitioning set correctly

if attr([Level])=(window_max(attr([Level]))) then 1 end

• ###### 7. Re: How to show the number of players at a particular level?

Hi Alex, thanks for your reply.  I'm not fully understanding what you have set out here, so I've attached a packaged workbook with some sample data.  Any help you can offer will be greatly appreciated!

• ###### 8. Re: How to show the number of players at a particular level?

Does http://community.tableau.com/message/194601#194601 answer this question as well?