Reputation: 1721
Tableau workbook uploaded here (refer to tab Products
)
When I plot products vs number of records, it is correct.
But when I plot products vs number of records in a location, and sort descending by Number of Records
it is incorrect.
It's as if the location is being ignored.
How to troubleshoot?
Upvotes: 0
Views: 61
Reputation: 1657
You can achieve this by creating a RANK Function.
Create a rank function with your measure value something like RANK(SUM(OrderNumbers)).
Then place the created function in between the location and product.
Select the Edit Table Calculation of the Rank Measure and select advanced from the Compute Using dropdown. Select Location as the top value and product to the addressing box and click ok.
Then click on the dropdown from restarting every and select Location and click on Ok.
Now your bar will be sorted according to the one what you want.
Upvotes: 1
Reputation: 3318
Create a new calculated field with the following
[Location]+[Product]
Place this field in between Location and Product on the Rows shelf. Sort on this field by Descending on Sum Number of Records.
Finally, deselect "Show Header" on that field's pill in the row shelf.
Upvotes: 1