Including and Excluding Filter values based on a particular criteria - tableau-api

Attached is the mock data on which we are trying to do the following :
We have Configuration Id : which is a part of a car like dashboard of the car or tyres etc.
Then we have part attachments which tells you about the parts that make up an entire configuration. For eg : 'head lights', 'rear lights' and 'fog lamps' make up 'Lights'.
Problem Statement : We need to have 2 filters : Part attachment included and excluded such that, when part attachments included is selected as steering then I get 3 rows(marked in yellow in column E) based on selection. But in the part attachments excluded filter, we don't want the configuration id where the part attachment = 'Headlight'. This means that row no 17 should be eliminated when filtering gout headlamps from the filter.
So basically when part attachment excluded filter excludes 'headlight' then data in row no 17 should not be show in tableau.
I found this a little difficult to implement using normal filters in tableau.

Using normal filter you won't be able to achieve this, Try below method:
Create two parameters:
Include and exclude and take the respective database fields using the list radio button.
Now create 2 calcualted fields:
Include:
Parameter1 = Databasefield
Exclude:
Parameter2= database field
Now when placing the two parameters on to filters for include select True and for Exclude select False

Related

How do I filter choices from a lookup field that points to a different SharePoint list?

I have an app built based on the a SharePoint list called "Proposal Tracker". One of the fields is a lookup field that provides a drop down from another list called "Employees". I am trying to filter this field, so that when I select it, the only employee names that are shown are the "active" employees.
I've tried adding this into the DataField of the one data card I'm trying to filter, but I get an error.
Filter(Employees,Status.Value = "Active")
Use Filter(CollectionName,Condition)
e.g: Filter(Employees,Status = "Active")
When you have a dropdown control selected you can choose its dependencies from other controls on the screen.
Example:

How to select columns using a wildcard search on column names in SPSS Modeler

I am doing time series analyis predicting sales for a large amount of products. After executing the time series node, I get a table containing the original sales data and predicted values with a suffix "$TS-" before the product name. Now I would like to select / filter only those columns containing a "$TS-" in the column name.
There is no easy or straightforward way to do something like this. The simplest way, in my opinion, would be to
Add a 'Filter' node after the time series model nugget
Use the funnel button to "Remove all Fields"
Select to include each of the individual fields that you would like to keep
Make sure that the node is set to Include fields by default
If fields are added to your original data sources or if new fields are derived in the stream, you'll have to go back to this node and remove them, so it's not ideal.
The alternative is to use a stream script to change the inclusion and removal of the fields within a "Filter" node. The script below will search for a "Filter" node with the name given by the variable filterNodeName and search for fields with the prefix given by the variable fieldNamePrefix and keep only the fields that match the designated prefix.
filterNodeName = "TS Fields Only"
fieldNamePrefix = "$TS-"
diagram = modeler.script.diagram()
# Find the 'Filter' node
renameFieldsNode = diagram.findByType('filternode', filterNodeName)
# Get the input data model - the fields that go into the 'Filter' node
fields = renameFieldsNode.getInputDataModel()
# Loop through all of the fields
for field in fields:
fieldName = field.getColumnName()
if fieldName.startswith(fieldNamePrefix):
# If the field name starts with the designated prefix then include the field
renameFieldsNode.setKeyedPropertyValue('include', fieldName, True)
else:
# Otherwise do not include the field
renameFieldsNode.setKeyedPropertyValue('include', fieldName, False)

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

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."

Form Assembly :: Concatenate fields in a Repeatable section

I have a Type and Phone number field in FormAssembly which is repeatable. When users add 2 entries like the one below,
User Entries:
Type: "Mobile" Number:6787867890
Type: "Landline" Number:7898878987
I need to concatenate the above entries to a single field like the one below using Calculation Fields
Expected Result:
Mobile:6787867890|Landline:7898878987
Any idea on how this can be achieved using Calculation fields in FormAssembly?
Just got this working by using 2 Calculation Fields. In the Repeatable section, I added a Calculation field(vEntries) which is hidden. vEntries will concatenate Type: "Mobile" Number:6787867890 to "Mobile:6787867890".
I declare another Calculation field(vFinalEntry) outside the repeatable section, this field is responsible for concatenating all the vEntries.
So when the user enters the second entry Type: "Landline" Number:7898878987, the vFinalEntry variable will have the value "Mobile:6787867890|Landline:7898878987".

Filtering a list lookup in Nintex Forms using an inline function

I am building a list form for SharePoint 2010 using Nintex Forms 2010.
The user must select an item from a different list, so I have added a List Lookup control. But the user can only select among items that starts with a specific string.
For example, the lookup list could contain items with titles 'foo1','foo2','bar1','bar2'. I only want the user to be able to select 'foo1' or 'foo2'.
In the filtering section of the List Lookup control I have specified the following:
Filter available selections = By a specific value
Where field = fn-Substring("Title",0,3)
Filtered by value = foo
Unfortunately this does not result in any options for the user to select - just an empty control.
If I change the filter to:
Where feild = Title
Filtered by value = foo1
Then I get the foo1 option - and only that one. Trying something like
Filtered by value = foo*
does not work either.
So how should I define the filter to get it to work. Or is what I am trying not possible in Nintex Forms?
The inline function won't work in your case, because it is a client side function, and your parameter is a server side object.
There two alternative ways can help with your request in server side.
1.Add a calculated value column to your list, use LEFT function to cut the search key for yourself:LEFT([Title],3). In nintex form, you can use this column to filter the list items.
Filter the list items in a view instead of nintex form. Suppose you have already known the [source view] property in List Lookup control.