It's no possible to see the field you drag in the color card, but it's just classify this field by measure value descendent.
2 of 2 people found this helpful
Hi Nushrat, you won't be able to do this when you use Measure Values/Names like you're doing now. If you could break this down by a dimension instead of by different measures, you could create an extra level of detail to sort upon by combining the color mark dimension with the column dimension, so that each color/dimension intersection has its own key to sort on. But you won't be able to do it with Measure Names, since [Measure Names] can't be used in calculations.
Thanks for letting me know. I'm fairly new to Tableau. Do you have any recommendations regarding how I could go about breaking it down by dimensions instead of measure?
1 of 1 people found this helpful
You're welcome! When you run into this issue, you usually have to reshape your data source before you can move forward.
What you want to do when designing or reshaping data sources is to think about the data structure that makes Tableau happiest, which is a ledger-like structure where you don't have any pivoted columns. For instance, in this example, we don't want a different column (measure, in this case) for the total population of each ethnicity. We want one column that measures population; each ethnicity will have its own row per city instead. Whenever a measure field is specific to a particular item in a dimension, you have pivoted data, which can be annoying to use in Tableau. Luckily, Tableau 9+ has a feature that can help you unpivot Excel data: Pivot Data (from Columns to Rows)
So, to recap, you don't want this:
City X Population Y Population Z Population Los Angeles 100 200 300
Instead, you want this:
City Ethnicity Population Los Angeles X 100 Los Angeles Y 200 Los Angeles Z 300
Once you've done this, you can simply drop the "Ethnicity" dimension pill onto columns to break down each city by ethnicity. Then, you can do what I mentioned before and create a calculation [City] + [Ethnicity] that's unique for each intersection of City and Ethnicity, and then sort on that.