Using a global filter field instead of a per column filter - react-data-grid

Assessing React-data-grid, I see the filter example puts a filter field on each column. Is it possible to implement a global filter field for the whole table?
Demo
http://adazzle.github.io/react-data-grid/docs/examples/column-filtering

Related

More condition under floating filter model instead of only two filters using ag-grid

Need to add one more condition under text filter model. Currently its only allow me filter the data using only two conditions and I am expecting one more extra condition. How to add extract textbox with AND OR option.

Aggregate field in Tableau tool

I would like to receive your help in order to create an aggregate field in the Tableau tool.
I have a data source. The data source contains a few records (tuples/lines), and each record contains some attributes. I.e. a numeric value, a unique attribute (Key) and string.
For example, the first two rows share the same key (ID=A). This entity contains 2 records, the numeric value for each record is different (1 and 5).
I would like to create a new field. This new field should contain the minimum numeric value for each unique ID (entry).
In order to create this new field, I created a calculated field. The field’s formula is- min(NumericField).
The problem occurred when I was trying to use this calculated aggregated field aggregate in order to create chats. In this case, the aggregation is no longer performed on my key field.
For example, I would like to calculate the average for each category (The avg should be calculated for the aggregated new field)
Do you have any idea in order to resolve the mentioned problem?
Thank you! ☺️
An example
Try using LOD as below:
{fixed [id]: avg([newcalculatedfield])}
Let me know if you need more help. thanks!

Filtering a datasource using multi select wild character

Does anyone know if there is a wildcard character in AppMaker that can be used for all possible values for a field in a query?
I currently have a datasource that is being filtered based on the status using a multi-select widget. What I would like to accomplish is when all values have been de-selected I want to load all the records of that datasource without clearing the entire query in case other filters have been applied. I have it working in-a-sense that I have to explicitly construct my query as such:
widget.datasource.query.filters.Status._in = ['Status Value 1','Status Value 2','Status Value 3']
My current solution is loading the correct data when a value is selected and it correctly shows the union of the query as the values are modified. However, it selects all of the values in my multi-select; which I know is how it is supposed to work.
I tried using widget.datasource.query.filters.Status._contains = ''; and changing the assignment value to no avail. I even tried the opposite approach using _notContains
The intended outcome is to have a filtering dashboard appear much like any website where when no filtering is selected all records are displayed. I was hoping to find a wildcard character that would load all of the records. Just trying to find a way to mimic other website filters with all records when none are selected.
Thanks for the time!
So the easiest solution here is to set up your Multiselect as follows:
Options binding:
#models.YourModel.fields.Status.possibleValues
or if you don't have the possible Status values in your model then set your options binding to:
['Status Value 1','Status Value 2','Status Value 3']
Values binding:
#datasource.query.filters.Status._in
Now anytime you select any choices in the multiselect, the query will only include records that include the selected choices. And if you deselect all choices the query will ignore that filter or treat it as an empty array of values, therefore returning all records unless you applied other filters.

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