1 of 1 people found this helpful
I've been playing with it a bit now too, and it seems that the sorting order cannot be forced when it is being used with the parameter. I would recommend adding this to the Ideas section!
I've been trying a few things with this today myself and here is what I came up with. There are a few other ways it can be done. Let me know if it's what you were looking to do.
Actually...it can be simplified even more. I have set up 2 options. You can either have your dimensions automatically filter ascending or descending, depending on how you need to sort you data.
Hopefully this helps.
Hi Don, I think you can simplify that descending calc even more:
does the same thing.
Guys, two questions:
1) ascending order the is the default order of dimensions anyway - right? So, even if I did not set up the ascending/descending box, the dimensions would still appear in ascending order - right?
2) I looked at the first file attached by Don ("Sort by Multiple Fields.twbx.zip"). Let's say Product Category had an entry "Others" or "Null" and I always want this to appear in the end. Is there way to set a manual order like that?
1) Yes, as long as there are no other sorts in the view that would conflict
2) If you are referring to a simple field, you can right click the field in the Data window, choose "Default Properties">>"Sort" and you can sort it however you want.
2) But doing that does not change the order of the dimension in a parameter. So, going back to the same .twbx I've mentioned in point (2) above, let's say in Sheet1, I choose "Region" from the parameter "Select Dimension Sheet1". The default sort order for Region is Central, East, West, South. I want to set this as East, West, South, Central. So, when I choose Region from "Select Dimension Sheet1" I want the regions to appear in this order.
Please note, I am ignoring the "Select Sort Sheet 2" for now (let's assume this does not exist!) since I am not interested in sorting based on the Sales value.
Right, I wasn't sure if you were referring to just a standard field like Product Category (since that is the field you mentioned), or a parameter of some kind.
To do this, you need to sort on the calculation that leverages your parameter, rather than trying to sort on the Region field. Simply choose "Region" from the parameter, then right click on the "Dimensions Sheet 3" pill on the Rows shelf, and choose Sort, and you can manually sort the order there. This is true for all the options in the parameter.
Good luck. If you have further questions, I might recommend opening a new thread with a packaged workbook attached, as well as any clear goals you are trying to achieve.
It appears that nobody in this thread mentioned this option for sorting values in a parameter. It probably isn't documented very well, if at all--but this is the process I've always used (sorting on the calculated field which leverages the parameter).
Perhaps a TabWiki doc or something is needed. I certainly would've expected someone to recommend this method.
That worked but only for that table or Sheet. What if I have a scenario where I use the parameter in multiple sheets that are then consolidated into a dashboard? (the parameter control box is common to all the sheets in the dashboard). So, I will have to change the Sort order of the calculated item in each Sheet - right?
I thought it makes sense to send the reply here since I am referring to your previous reply. Anyway, if you still prefer a new thread, I will go ahead and start one and paste a link here. Let me know and thanks for your time.
Actually, I just jumped into this thread to try and help you out; I wasn't part of it before then.
Its fine to post here, but if you have specific questions that apply to your own workbook/scenario, it is ideal to have a packaged workbook example, and clearly defined goals from the start so folks can provide the best help possible.
You may have to do that on all sheets if you've already built them out -- however, if you do this from the start on one sheet, and then create your other sheets by duplicating that sheet and changing the view, the sorting will be preserved. I typically do the sorting as soon as I create the parameter and add the calculation to one view, then I create the rest of my views by duplicating that (and I typically do the sorting in the Data window rather than on the pills in the view--both will have the same impact here, I believe)
I agree it should be much simpler, but its just not!
Yes, I agree duplicating is a good approach. But it so happened that I had to add some additional columns/dimensions to my raw data after I had set up an entire report in Tableau. While it was not much of a task adding that dimension to the an existing parameter and the related calculated field, setting a manual sort order for the new dimension in each Sheet and Dashboard was painful! I was just hoping there was an easier way to doing that.
Anyway, I appreciate your help and thanks a lot for your responses.
No worries, best of luck!