It won't be possible to help you without a packaged workbook. Sorting in Tableau is incredibly frustrating at times, and often does not behave the way we "think" it should.
May want to take a look at these links as well:
Tableau is all about pill arrangement and a lot depends on the way your view is set up. If you post a workbook, we can try to help you get where you want to be.
1 of 1 people found this helpful
I'm assuming you have multiple dimensions. (A screenshot or workbook would help)
When there is a single dimension:
Sorts as intended.
More than 1 dimension: Sorts total of values and gives the dimension a "Rank"
I used State and Container of the Superstore data that comes with Tableau Desktop
You'll see "Small Boxes" is at the top although it is visibly not the largest within Guandong. It's the largest over all the data.
Sorting from here isn't very hard. Adding the ability to have the end user sort is a little trickier but possible.
To sort create a combined field of State and container by selecting both dimensions, right click on the higher level dimension (In this example it is State) and selecting "Combine Fields".
This creates a new dimension called State & Container.
Place this in between the State and Container pills on the Rows shelf. Right click on the new pill.
and then you can choose to "Hide that field" by unchecking "Show Header" so that it doesn't distract from the visual.
Let me know if this was the problem you were running in to.
Maybe this is the problem. The dimension in the row shelf is "Product Name", but the dimension I'm filtering against is "Store Number" (which just represents an individual store location). I'm trying to sort against measure in the column shelf (SUM(Quantity)).
Would this really be multiple dimensions since I'm only using one in the shelves?
In order to be able to help, we will need to see your pill arrangement in a screenshot, or post a sample packaged workbook. Otherwise, we are just making educated guesses.
Unfortunately, I can't post the data because the product names are very specific to this retailer and would be obvious if shared.
Of note, the sorting behavior that I'm seeing is this: using the sort for the embedded at the bottom of the x-axis (for quantity), one click switches the order to alphabetical, next click sorts with the highest selling item at the top when I don't apply the location filter, and the third click is the reverse order of this. That is, it seems to be trying to maintain the sort order before filtering out by store location.
You can mock up a sample workbook using sample data pretty quickly... or provide us with a screenshot of your pill arrangement and black out all the products.
Here's how it is all arranged. Quantity is number of item purchased. Name is the list of product names. StoreRef is the store identifier. I'm trying to filter out purchase made in certain stores. If I use the sort button that the pink arrow is pointing to, that's where I have problems. If I use the sort below "Server" in the menu bar, it works fine.
Of note, the StoreRef is in another data source (but connected) from the other pieces of data. Could this be a factor?
He's filter is on a secondary dimension. That kind of throws a wrench in to some functionality of sorting.
That's one of the things I tried first. See my reply above and that might be part of the problem.
Ahh, yes, I didn't notice the secondary source. Probably does have an impact. I don't know that for sure, but based on all the other limitations that exist when blending, I'd guess it makes a difference here.
Any guess how to make it work?
Does your scenario allow for you to create a "Join" instead of a "Blend"?