How to sort split group of metric visualization? - kibana

Is there a way to sort the given metrics descending?

From official support at kibana forums:
Unfortunately, there's no way to sort filters aggregation. However, depending on how complicated your filters are, you might be able to create a terms aggregation and add filters to the whole visualization, eg. on the enclosed picture I filter to only get destination (Dest) of the three airports I am interested in and sort it by descending order.

Related

Quicksight - distinct count of a value while ignoring filters

I need to compare an initial distinct count of values (with no filters applied) vs a distinct count of the same values after some filters have been applied.
I've searched a lot and can't find how to do this. Not sure if level aware calculation will work since I don't need to do a countOver.
If you want to do that in a graph, filters have the option to be applied only in some visuals:
Documentation

Show Two Groups in Tableau Heat Maps

I’m relatively new to Tableau and have a question.
I want to create a heatmap show the location of two different groups of people. I’ve learned how to overlay maps using dual axis but the problem I keep running into is that each group requires different filters to aggregate the data the way I want.
Basically, I want to show:
Group1.id IF charge_id IS NOT NULL
And
Group2.id IF status = ‘ACTIVE’
Whenever I create a calculated field with one of the above calculated fields and place it in the filters box it automatically removes the other group from the map because the filters contradict one and other.
Help is much appreciated 😊
The filter shelf applies to the entire worksheet, so if you want to “filter” each field selectively, use an IF expression in a calculated field that evaluates to null when you don’t want that field in the view.
Give sample data if you want more detail

Firestore order by two fields

In firestore I'm wondering if there is a way to have a hueristic1 and get all data between two hueristic1 values but order the results based on a hueristic2.
I ask because the data at bottom of both pages
https://firebase.google.com/docs/firestore/query-data/order-limit-data
https://firebase.google.com/docs/firestore/query-data/query-cursors
there seems to be slightly contradictory documentation.
What I want to be able to do is
Ref.startAt(some h1 value).endAt(some second h1 value).orderBy(h2).
I know I'd probably have to index by h1 but even then I'm not sure if there is a way to do this.
Update:
I didn't test this well enough to see that is doesn't produce the desired ordering. The OP asked the question again and got an answer from a Firebase team member:
Because Cloud Firestore doesn't support ordering by a different field
than the supplied inequality, you won't be able to sort by name
directly from the query. Instead you'd need to sort client-side once
you've fetched the data.
The API supports the capability you want, although I don't see an example in the documentation that shows it.
The ordering of the query terms is important. Suppose you have a collection of cities and the fields of interest are population (h1) and name (h2). To get the cities with population in range 1000 to 2000, ordered by name, the query would be:
citiesRef.orderBy("population").orderBy("name").startAt(1000).endAt(2000)
This query requires a composite index, which you can create manually in the console. Or as the documentation there indicates, the system will help you:
Instead of defining a composite index manually, run your query in your
app code to get a link for generating the required index.

OpenTSDB indexing on keys

As I've worked in my personal lab instance of OpenTSDB, I've started to wonder if it is possible to get it to index on tags as well as metric names. My understanding (correction is welcome...) is that OpenTSDB indexes only on metric names. So, suppose I have something like the following, borrowed from the docs:
tsd.hbase.rpcs{type=*,host=tsd1}
My understanding is that tsd.hbase.rpcs is indexed for searching, but that the keys (type=, host=, etc) are not. Is that correct? If so, is there a way to have them be indexed, or some reasonable approximation of it? Thanks.
Yes you are correct, according to the documentation, OpenTSDB creates keys in the 'tsdb' HBase table of the form
[salt]<metric_uid><timestamp><tagk1><tagv1>[...<tagkN><tagvN>]
When you do a query with specific tagk and tagv OpenTSDB can construct the key and look it up. If you have a range of tagk and tagv it will look up all the rows and either aggregate them or return multiple time series, depending on your query.
If you are interested in asking questions about tagks, you should use the OpenTSDB search/lookup api, however this still requires a metric name.
If you want to formulate your question around tagks only, you could consider forwarding your data to Bosun for indexing and using its API
/api/metric/{tagk}/{tagv}
Returns the metrics that are available for the specified tagk/tagv pair. For example, you can see what metrics are available for host=server01

Why is this so in Crossfilter?

In the Crossfilter documentation, it states the following.
a grouping intersects the crossfilter's current filters, except for the associated dimension's filter. Thus, group methods consider only records that satisfy every filter except this dimension's filter. So, if the crossfilter of payments is filtered by type and total, then group by total only observes the filter by type.
What is the reasoning behind that and what is the way around it?
The reason is that Crossfilter is designed for filtering on coordinated views. In this scenario, you are usually filtering on a dimension that is visualized and you want to see other dimensions change based on your filter. But the dimension where the filter is defined should stay constant, partially because it would be redundant (the filter mechanism is usually displayed visually already) and partly because you don't want your dimension values to jump around while you are trying to filter on them.
In any case, to get around it you can define two identical dimensions on the same attribute. Use one dimension for filtering and the other for grouping. This way, as far as Crossfilter is concerned, your filtering dimension and grouping dimensions are separate.

Resources