Commenting so I'll be notified if someone replies!
My first thought would be to use a parameter and a calculated field with a table calculation, something like:
INDEX()<=[Parameter Top X]
And placing it on your Level of Detail shelf, and then your filter shelf, keeping only when it is true. If you view is already sorted the way you want, then the default compute using of "Table (Down)" may be appropriate.
If you have anything interesting going on, or additional factors that need to be considered, this may not produce the expected results, and you would need to provide a workbook based on sample data that represents your situation for a solution to be shared with you.
My Question is somewhat related to above question,
I have Product and sales and i show my products and theirs sales for last 13 Months in a line chart. This i can do by placing dates in filter shelf and select relative dates and by saying last 13 months...
but my question here is " i have a parameter saying 'Weekly' & 'Monthly' So, If i select 'Monthly' it should show last 13 months sales and If i select 'Weekly' then it should show last 13 Weeks..
Is this Possible?
Attached is one of many ways to accomplish what I gather you are looking for.
If this does not fit your situation, please provide a sample workbook that demonstrates your situation.
previous_selection.twbx 69.4 KB
That was awesome i got the same thing in some other way but your's better then mine.
One more question regarding this aggregation, So when we are changing the parameters from weekly to monthly and last 13 months/13 weeks, Does this aggregation done at backend or does it happen at front end..
If this aggregation happens at front end(tableau) this will effect the Run time right? And Performance will be bad.
What do you think?
Performance depends on a few things. Can you tell me about the profile about your data, such as:
- how many records?
- how many products?
- what is the data range?
- Will there be any other fields or dimension at play?
- Can you provide a sample data that is representative?
I can then create some sample data and do some performance testing, and maybe provide another method that is more efficient with a greater number of records.
The thing is we are having 2 aggregate tables now one is weekly aggregate and other is Monthly, in this way we aggregate everything in Database, But if we do the aggregation at tableau level as we discussed earlier it will increase run time affecting performance as all the aggregations will be done after pulling tons of records.
So i just want to confirm that can we use this two different objects from this two aggregation tables in creating parameter monthly/weekly.
And i even want to confirm that if i select weekly in parameter i want to pull all the metrics from weekly aggregate table and if i select monthly then i want to pull all the metrics from monthly aggregate.
So does it change the Join in SQL dynamically depending on our selection in parameter...
Here is my first thought:
If you are pre-aggregating your data, then you can simply union your two data tables, adding a column to denote the source table, either "weekly" or "monthly", and instead of the parameter "Aggregation Level" in the workbook I attached above, it would become a quick filter based on that column added when unioning your tables.
I caution you, I can not say for sure what the best method is without seeing something that represents your situation. I am just guessing without an example from you.
Thanks... This help me a lot !
I have a variation on the theme discussed above. I want to use a parameter to limit the number of lines on a map. I have altered the famous maps_with_paths to illustrate the point, but in my data there are many hundreds of lines crisscrossing the map....so depending on the user selections they should be able to choose how many lines they want.
Any suggestions very much appreciated
maps_with_paths.twbx 60.2 KB
I am guessing the attached is what you are looking for. Here is what I did from your workbook:
1. removed the pill "LinesOnMap" from the Filter shelf
2. set the Compute using for the pill "LinesOnMap" on the Level of Detail shelf to "DC to City Path ID"
3. ctrl-drag-and-dropped the pill "LinesOnMap" from the Level of Detail shelf onto the Filter shelf, keeping only when true
4. I set a sort order on the pill "DC to City Path ID" so that the ones kept are the longest
maps_with_paths_edit.twbx 57.1 KB
Excellent. Thanks Joe. Other priorities for the customer took me a while to get back to this, but your solution worked perfectly. Thank you.