6 Replies Latest reply on Nov 22, 2013 11:25 AM by francescoemanuele.bucci

# Treemap: filter differently on size and colours

Hello everyone, I'm new of tableau. Here I go with my question: let say that I have a table which columns are: Team, Country, Rank. I have 500 values.

Now I want a tree map which filters by country and where the size of the rectangle is given by count(Rank) but the colour is given by the count on the first 100 values of the column Rank.

In this case let say that I have 100 Spanish teams, 100 Italian teams, 100 English teams, but in the first 100 there are 10 Italians, 15 english, 20 spanish. In this case I would see the rectangle related to the three countries of the same size but of different colour.

I don't know how to apply the selection on the colours. If I add the measure "Rank" among the filters then this affect also the size mark.

I hope I made myself pretty clear. Thank you for your help.

Francesco

• ###### 1. Re: Treemap: filter differently on size and colours

Hi Francesco,

Welcome to the forums! Would you be able to post a sample workbook?

-Tracy

• ###### 2. Re: Treemap: filter differently on size and colours

Hello tracy, if for sample you mean a screenshot, here we go:

Size and colour follow the same measure (CNT(Rank)) but I would like that the colour would do something different CNT(Rank(1:100)), just count how many times the country appears in the first 100 positions.

Is it possible? It would be easily possible editing my spreadsheet actually, I just add a column and I put all 1 between 1 and 100 and I leave empty (or 0s) to all the others. But if for this dataset is easy, it could be useful to know how to do it in Tableau, if it is possible.

• ###### 3. Re: Treemap: filter differently on size and colours

It looks like Rank is already calculated, so try COUNT(IF [Rank] <= 100 THEN 1 END) for Color.

• ###### 4. Re: Treemap: filter differently on size and colours

This works, apparently! Thank you very much.

Actually what I was missing is the correct syntax. I'm pretty new with Tableau.

• ###### 5. Re: Treemap: filter differently on size and colours

You're welcome, and welcome to the Tableau community!

On Fri, Nov 22, 2013 at 9:38 AM, francescoemanuele.bucci <

• ###### 6. Re: Treemap: filter differently on size and colours

Thank you