How to use values from a list aggregated field in a table to a filter in Quicksight? - amazon-quicksight

I have a dashboard in Quick-sight where a table is being used which contains a field that has values list aggregated.(Please refer the attached image).
I need to create a filter in a dashboard that will have a dropdown with distinct values from the list aggregated values so that if i select/check a particular value from a dropdown then it should filter out the list aggregated record by matching the string i selected in a drop down.
I tried to use the split function to get the distinct values from the list aggregated values from the field. However, the filter did not work as i expected.
Please suggest possible solution. Will appreciate any suggestions.

Related

Quicksight control to include nulls

I have a quicksight dataset where one of the data fields is routingtype which can be filled with "Agent_direct", "agent_select" and "null" as the values. I have created a parameter and filter linked to the parameter but when I create the control and link it back to the dataset and routingtype field I am unable to filter by null values in the control. Is there a way to include those in the control?routing type control

How can I create a list of values for a field in Kibana?

I am using Kibana to view data from Elasticsearch index. There is a field only has a few values. When I do search the field, how can I make the search bar as a select rather than a free text input? I know that there is a filter list like below image:
but it doesn't work for the case that top 5 values in 500 records have one value. How can I show all values in the history as a list for a field?
I think your are looking for "controls" visualization.
Go to visualization > controls
Then choose option list, your index and your field.
The result will be a dropdown with values like if you did a select distinct on your field within the whole kibana range.
Add it to a dashboard to have a filtering interface human usable dashboard.
Update:
Maybe a simple filter on the discover page can answer to your question.

In ElasticSearch, how do I get only one from list in subproperties (nested/child/whatever) and sort by it

I have a type Product, which has multiple Prices, but the returned model can only ever have one price.
I need to have multiple prices in elastic, to be able to vary on time without having to reindex. I also need to be able to sort products based on price.
I have tried both with nested and child properties, but I don't seem to be able to query it correctly.
So is it possible to achieve this using elastic? If not, how should I structure my index instead?
You can set the field data type to array. Then sort by for example the max value using the mode option.
See for examples:
https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html
What ended up doing is to get the current price via inner hits https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-inner-hits.html
And then add the inner hit to the model after it was returned from elastic.

Sorting string column in Kibana visualization

I have a status field in my elastic search index which can take values Open,Closed,Clear,Intermediate,Ready for Approval. Right now, I have created a visualization and sorted this field descending based on the Term. What I want to achieve is - I want this to be sorted in this particular order Open,Clear,Intermediate,Ready for Approval,Closed.
How do I achieve this? One option I am thinking is creating a scripted field and prefixing with integer column, but I am not sure if I will be able to filter the visualization later?
If this list of possible values is a static list of known values, there is another way to define your visualization with a little more manual configuration. Just replace your terms aggregation with a filters aggregation and add custom filters for the possible values like so:
Kibana will respect the order of your filters in the visualization. From a performance perspective, this should also be better than using a scripted field...

How to tabulate data , without doing any aggregation in Kibana?

How can I tabulate data from events in kibana, without doing any aggregations?
I want to prepare a table containing 3 columns:
Hotel Name
No. of Rooms
Zipcode of Hotel
I want to extract this info from events and populate the table with above three values. How can I do this in Kibana?
You may be able to accomplish this by saving a search in the discover application and adding it to a dashboard directly (skipping the visualize step).
At the top of the "Add" panel in dashboard there is a "Searches" tab:
This tab lists all of the searches that you've saved from Discover and allows you to visualize the raw field values of documents as a table.
Hope that helps!
You can't make a table without aggregating, but (depending on your data) you may be able to get what you want by aggregating first on hotel name (Terms, Field=name, Order=Top, Size=100) then by zip code (Terms, Field=zip). The aggregation is so narrow that there is never more than one hotel in any given bucket.
Then use metric of Sum of number of rooms.
This assumes there are no two same-named hotels in the same zip code. If there are, you'll need to add a third column with some unique identifier.
I tried this using the following mapping
{"name": {"type":"string","index":"not_analyzed"},
"number-of-rooms":{"type":"integer"},
"zip": {"type":"string","index":"not_analyzed"}}
It worked fine, with the drawback that the table column header labels are "Top 100 name", "Top 100 zip" and "Sum of number-of-rooms", which isn't very user friendly.

Resources