how to create multiple filters from one dimension tableau (10)? - tableau-api

I have a two dimensions with the following data set
Original Dimension
I would like to create two filters that can be used to filter my dashboard. These two filter would be called - "Product_Type" and "Product" and should have the following drop downs:
Filter Breakdown
To summarize, I am looking for a way to take my original dimension and create the filter breakdowns so that in my dashboard I can have two filter (Product_type and Product). When i click on the Product_type filter, i should be able to see "overall", "fruits", "vegetable" and "leafy. Based on my selection , the Product filter should automatically show only the relevant values - i.e. if i picked "leafy" it should only show "spinach" and "kale". Finally if i select "kale" my entire dashboard should change accordingly.
Looking for a way to do this without drastically affecting the performance.
update: i was able to achieve this by creating multiple parameters and then using the pop window technique (https://vimeo.com/107352893) - but this has affected my workbook performance very badly. Need another solution!!

You should be able to accomplish your desired functionality by creating a calculated field for product type and a CASE statement to classify the products based on the product type you specified your image.
Further, filters can be configured to display available values based on the other filters in place. I would recommend having your Product Type filter a the "context" or "data-source" level, and your product filter at the lowest level, so that the selectable options for the product filter can be displayed using the "only relevant Values" option and limits the products that can be chosen.
Please see the following link for some more information on filtering hierarchies
Performance Related
General Filtering
Blog Post
"Only relevant values - Specifies which values to show in the filter. When you select this option other filters are considered and only values that pass these filters are shown. For example, a filter on State will only show the Eastern states when a filter on Region is set. You can use the toggle at the top of the filter card to switch between this option and the All Values in Database option.
All values in database - Specifies which values to show in the filter. When you select this option all values in the database are shown regardless of the other filters on the view.
All values in context (Tableau Desktop only) - When one of the filters in the view is a context filter, select this option on a different filter to only display values that pass through the context filter. For more information, see Improve View Performance with Context Filters."

Related

How to create queries dynamically based on filters selected in PostgreSQL?

I have a UI where products of various categories will be listed. There will be filters on various attributes which users can select to filter out the products. How should I create a query which will change dynamically based on the selection of filters? Further, once the result set is ready, only few rows to be displayed at a time to the user e.g. 10 rows at a time; value of which again will be decided by the user.
You could write a PL/pgSQL function that takes a JSON with filter fields and values and returns matching rows. But there are libraries for doing that, why not use one of them. What is your UI built on?
On pagination, see Five ways to paginate in Postgres

Advanced tag filtering not working for more than one tags selected in same collection

The problem I'm having right now is related to advanced filtering in shopify theme "Fashe"
I have made certain filter groups in my store using advanced filtering by group option. But when i choose a filter in one category, I want other filters to be updated as well related to that category.
Like If i choose collection type to be of one kind, i want the collection colors to be related to those kind only. right now it shows me all the colors available in my store. If choosing one filter, it should change the values in other filters also based on the collection type.
If somebody has this issue resolved, I would be very much pleased if you help me with this.
SECOND THING
One more issue is when I select filter A, the theme gives me the results associated with that filter but when i click Filter B (filter A being selected already) the theme gives me no results instead it shows that no products matching. Somebody with this issue???
Example: www.mytheme/collections/fine/opt1+opt2
This works as an AND statement. But I want to show results from both, opt1 and opt2.
Shopify should work with OR statements. Like combined results of filter A and Filter B.

Filemaker conditional dropdown population

continuing a project I have posted a few questions for already are you able to have a more precise definition of what a dropdown is populated with?
I am using FM Starting Point and have a Projects, Estimate and Task table. A project can hold multiple estimates and tasks. Estimates contain multiple lines (stored in a separate table).
When In a Project you can add a task for that project. What I want to do is replace the field that gives the task a name with a list of lines contained within the estimates related to the project i have selected to add the task from.
I have created a dropdown and using the inspector got it to display all estimate lines but somehow I need to write a function that will only select lines from estimates that are within the project and also only estimates that have a field set to "active" for example.
what I am struggling with is where I can programme such a thing? In the inspector, you are limited to displaying a value and cant programme in a statement. I have tried a script that executes OnObjectEnter or OnObjectModify but that doesn't appear to work.
Any ideas where I can enter a more complex set of rules as to what populates a dropdown?
Create a relationship with the criteria you need. Base the value list for the dropdown on this relationship.
As for display, The value list's second field can be from a calculated field with any data or several other fields stringed together if no single field is sufficient. The first field should be the ID.

Tableau Data Security for Sales Revenue

I want the salesrep to see both theirs and OVERALL TEAMS PERFORMANCE. Is it possible to create a TOGGLE SWITCH : ME/TEAM...when they click on ME - it shows them their revenue and when they click on TEAM - it show overall team revenue. But, they still shouldn't be able to see other salesman revenue...Thanks
Currently, I'm filtering their access to data by their USERNAME using the FULLNAME() function in Tableau. I'm wondering how would the salesrep be able to see the revenue of the TEAM OVERALL which helps them to compare their performance to the team overall
As far as I can tell, with your current setup, you will only be able to display the active sales reps data. This appears to be a requirement for data security. If you want reps to see the overall team data as well, I would create a second data source with aggregated team data, create a view based on this data and place both views side by side on a dashboard.
After that, you could build in the toggle functionality with parameter controls.
Create a parameter. Simple example would be a text input that accepts two values, ME or TEAM. For this example, let's call the parameter Parameter 1.
Set up a conditional calculated field to handle your data security. The condition is based on the parameter. For this example, let's call the calculated field What To Show.
Add a filter, preferably at the data source, for What To Show = True.
The code for What To Show is
if [Parameter 1] = "ME" then [USERNAME] = FULLNAME() END
[USERNAME] of course is whatever your security column is called.
What you are doing here is conditionally applying row-level security based on what parameter your user has selected.

Filtering by custom dimension

I created a hit scoped custom dimension called "type". Also I created a view with include filter "type" = "Books". However in reports I see click hits with other dimension values (e.g., Books Sci-Fi). Do I have to add also exclude filter for view?
Essentially problem was that filter value have to be reg. exp. I changed it to ^Books$ and now hits with custom dimension "Books Sci-Fi" are excluded.