How to provide filter tab in timelion charts? - kibana

I am trying out some timelion visualizations in Kibana. In it I am not sure how to provide filter tab for the data.
For example, yearly country population data and filter tab to filter it based on zone and state.
Usually a timelion expression is just like ".es()" and some functions which can be appended to it like
.es(*).bars().label("Population")
I don't want to specify filter under ".es(q=???)" as this will make the filter static and the user won't be able to use filtering directly. ( In this case, every time user has to go to edit timelion window and edit filter there.)

you can specify a lucene query string as the q argument to .es() as in
.es(q=field:value)
That query string would only affect this time series and not interfere with the rest of your dashboard.

Related

Need help in apply kibana query

I want to know the query for kibana, i tried terms and agg, but didnt get right output, so need to filter the data based on distinct query in kibana.
I want to apply query in following input data in elasticsearch
Rows and columns
CELLID|MCC|MNC|
1222|405|861|
1222|405|861|
1222|405|122|
1233|406|861|
1233|406|861|
1224|407|777|
1224|407|777|
need to apply query such a way, it will remove the same CELL ID with different MNC, so expecting output like this
CELLID|MCC|MNC|
1233|406|861|
1233|406|861|
1224|407|777|
1224|407|777|
As you know, it's impossible to have such row vs column infrastructure within Kibana graphs as of now. Cos this feature is yet be made to the new versions as an enhancement.
But then if you're simply trying to print out the count|sum or let it be whatever the aggregation you need, you can have a Data Table visualization with a metric of count and then within your buckets you could define multiple terms-aggregation. In your case, you should have CELLID|MCC|MNC being split by terms-aggregation which should do the job for you. Hope this helps!

Link to primary and secondary data sources in Tableau

I’m trying to create a dashboard filter in Tableau. All but one of my graphs have the same primary data source A. The filter will affect all these graphs as intended. However I have one sheet where the primary data source is B, and the secondary data source is A. I can’t get this particular graph to link to the quick filter I’ve created. Does anyone know of a workaround for this?
The easiest way to filter multiple data sources from a single user control is to use a parameter along with calculated fields in each data source that reference the parameter setting. The calculated fields can then be put on the filter shelf for the appropriate worksheets.
This solution doesn't fit every circumstance.
Parameters can only have a single value, and the list of arbitrary values must either be defined statically in the workbook or allow the user to enter an arbitrary value. You can't dynamically lookup the list of legal parameter values in a database table (although you can use a field to populate the list initially).
Parameters are independent of any data source.
So if these restrictions don't hamper your use case, then you can have one parameter control on a dashboard that influences the filters applied to many worksheets. The simplest calculated field used for filtering could just say [My_Field] = [My_Parameter]. You can allow extend this idea to define parameter values that reference multiple choices like: "A", "B", "A and B" and then adjust your calculated fields accordingly. At some point, this approach gets unwieldy.
Another approach is use a worksheet as a filter, by displaying marks for each option, and then using filter actions to use the selected marks to filter other worksheets. This approach allows multiple selection, and dynamically loading choices from a database table.

How to list unique values of a particular field in Kibana

I am having a field named rpc in my elasticsearch database and I am displaying it using Kibana. When I search in search bar of kibana like:
rpc:*
It display all the values of rpc field but I want to have only those value to be displayed which are unique.
I have been playing around with Kibana4 since a couple of weeks now. I find it intuitive and simple and the experience has been great till now. Following your question, I tried getting unique results via a Data Table visualization. Why? Because I personally find it easier to understand. Following are the steps:
1. Get unique count
Create the visualization (Visualize -> Data Table). First lets get
the count of how many unique entries we have for a particular field
(We will use this in the later part for verification). I'm using
clientip.raw but as I see, it will work just fine with any friendly
field name too.
2. Set the aggregation right
Set you aggregation back to count and have a Split Rows as follows. Not doing this will give you count 1 for each field value (since it is looking for unique counts) when you populate the table. Noteworthy part is setting the Top field to 0. Because Kibana won't let you enter anything else than a digit (Obviously!). This was the tricky part. Hit Apply and you'll get the results. Unique field values and the count of each of them.
3. Verification:
Going to the last page of the table, we see there are exactly 543 results. This is how I know it works.
What Next?
You save this visualization and add it to a Dashboard. There you can always check the request, query, response and other stats.
Just an addition to the above mathakoot answer.
For the user of newer version (which do not allow bucket size of 0 anymore) just set a value greater than the maximum number of result
And report the value in the Options>Per Page field
I am using Kibana 6 so the UI looks a bit different than the older answers here.
Here is what worked for me
Create a visualization from your query, I used a line graph type (don't think it matters)
Under Data, set metrics aggregation = "Unique Count" and set field to your field.
Set x-axis aggregation = "Terms" and set field to your field.
Set Size > your number of records
Under Metrics and Axes, disable drawing of the graph, circles, and labels (this really helps the UI not lag)
Run query and then click "Inspect" and download CSV
Data
Metrics & Axes
I wanted to achieve something similar but I'm stuck with Kibana 3.1.
I simply added a panel of type "TERMS" and configured its Field = User-agent and left everything else on default values. This gave me a nice bar chart with one bar for each User-agent.

Kibana i see Indices and fields but cannot Chart or Visualize

I curled the sample bank data to elasticsearch. On Kibana I see under the Indices bank and on visualize all the fields (age, balance, etc.) on the left but cannot see charts on the right. It always says No Results Found. On the left I selected Y-Axis - Agg as Average and Field as Balance and X-Axis Agg as Terms and Field as Age, all from drop downs. Then I used the APPLY action. No error is displayed, but neither is a chart.
What am I doing wrong here? Using curl I can check the elastic search and see that the data exists. No matter what I do, I do not see any logging in the elasticsearch logs under /usr/share/elasticsearch/logs.
I don't know if you figured this out or not but I had the exact same problem. I was using a mapping type that did not contain the field I was trying to visualize. Make sure the _type field contains a mapping with the correct indexed fields.
When setting up my initial index patterns, I glossed over specifying the 'Default timestamp' field, and the UI didn't insist on having one. The fix was to delete my index patterns and re-create them them, with the specified timestamp field. Everything snapped into place.

salesforce.com matrix reports - more than 2 columns on row headings

I need to create a donor summary report that provides total donations by donor by year.
I need to provide
name address email yr1total yr2total etc...
It looks like salesforce only allows two columns in row headings and two columns in column headings. Is there a way to work around this
Or, is there a way to use the tabular report to do the same?
TIA
If donations is a single field on the donor's record, it seems like what you're looking to do is attempt to display two columns for the same data within a report. The best way to do this (well, outside of creating a master-detail relationship with a new custom object named "Donations") would to have formula fields for each of the donation years, and calculate the donation sums in each of them. That is, as long as you have a way of calculating the year of the donation.
I believe to get the best answer, more information is needed.
Something like this? This will work if your donation is a separate object that's linked to Account (I've used Tasks & Events linked to Accounts in my example).
Create a report in "Matrix format".
Drop Account Name on the left pane, Donation's Date on the columns.
Columns will default to days. Click the dropdown in the place where I have "Created Date" and select summarizing by year (of course fine-tune to whatever you need).
Check date ranges / filter criteria etc obviously if you don't see all data.
Click Show -> Hide details.
Drop your "Donation Amount" or similar field into place where "Record Count" is displayed. Use "Sum".
Optionally deselect Show -> Record Count.
Now you're mentioning that there are only 2 columns so you probably already tried this. Well, common trick is to cheat by using a formula field that would hold your data (separated by comma maybe?). Tabular report would require you to create some helper fields (1 per year) on Account and do some kind of rollup summaries, messy.
If it's for a dashboard you could play with summary report (it can have more groups than 2) and pick chart type table on the dashboard...

Resources