alternative for periodOverPeriodPercentDifference in quicksight - amazon-quicksight

whenever I use the periodOverPeriodPercentDifference in the quicksight pivot table, it only gives the values for the lowest granularity on the row-wise basis and if I collapse all then all I can see is a blank in that calculated field. Is there any alternative for the periodOverPeriodPercentDifference in quicksight?
I tried with periodOverPeriodPercentDifference it's but no use so I want an alternative for that. can anyone help me with that?
short description:
Calculates Percent difference of the measure over two different time periods as specified by Period Granularity (** defaults to visual aggregation granularity **) and Offset (defaults to 1).

Related

How to exclude lowest value from average calculation in Kibana

I usually do it in Excel but it is not easy for me to do it in KIBANA as well
I have this table in Excel and every hour I want to average for all instancs in the fiels "detail" but excluding the lowest three values (nine details each hour, the average should be only for the the six highest of them). In Excel I use the LARGE function.
https://docs.google.com/spreadsheets/d/1LcKO8TGl49dz6usWNwxRx0oVgQb9s_h1/edit?usp=sharing&ouid=114168049607741321864&rtpof=true&sd=true
In your opinion is there any chance to do it directly in KIBANA?
No idea how to proceed
You can use lens table visualization and set the number of rows to 6 and order rows by descending order of your CPU load. Look at the sample data table here
The average here is calculated for the top 6 values of bytes only.
Here are the settings:
You can try replacing the clientIP here by details and bytes by CPU load
No, it is not possible to automatically remove the last N results from the equation in Kibana. You should be manually filtering out from the list in the visualization every time.
The only alternative I see is to add an extra step that deletes or flags the 3 results per hour you want to exclude, and then in Kibana you just add a regular filter.
The easiest way I can think of is creating a watcher that groups the results by hour, sort by CPU, and then ingest the first 6 results in a different index you can query using Kibana.
Docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-alerting.html
If this acceptable for you I can edit this answer with more details about the Watcher I would create.

Use label as metric in Grafana Prometheus source

Hello everyone I have prometheus as a label returns the amount. The metric value is the number of payments. How do I withdraw the total amount a day to the dashboard? i.e. value_metric*sum
As far as I know, there is no way to do that because labels aren't meant to be used in calculations. Labels and their values are essentially the index of Prometheus' NoSQL TSDB, they're used to create relations and join pieces of data together. You wouldn't store values and do math with column names of a relational database, would you?
Another problem is that labels with high cardinality greatly increase database size. Here is an extraction from Prometheus best practices:
CAUTION: Remember that every unique combination of key-value label pairs represents a new time series, which can dramatically increase the amount of data stored. Do not use labels to store dimensions with high cardinality (many different label values), such as user IDs, email addresses, or other unbounded sets of values.
Though I see that you use somewhat fixed values in labels, maybe a histogram would fit your needs.

How to create visualization using ratio of fields

I have a data set similar to the table below (simplified for brevity)
I need to calculate the total spend per conversion per team for every month, with ability to plot this as time based line chart being an additional nicety. The total spend is equal to the sum of Phone Expenditure, Travel allowance & Misc. Allowance, this can be a calculated field.
I cannot add a calculated field for the ratio, as for some sales person, the number of conversion can be 0 for a given month. So, averaging over team is not option. How can I go about this?
Thanks for help and suggestions in advance!
I've discussed the question with the Harish offline. I've learned that he is trying to calculate ratio per group, not per row.
To perform calculations per group, users can add calculated fields inside a QuickSight analysis and use level aware aggregation expressions. (Note that level aware aggregations can only be used in an analysis, not in the data prep view). Here is a link to the documentation about level aware aggregations if you want to learn more about this area https://docs.aws.amazon.com/quicksight/latest/user/level-aware-aggregations.html

Grafana difference between two datapoints

In a Graphana dashboard with several datapoints, how can I get the difference between the last value and the previouse one for the same metric?
Perhaps the tricky part is that the tiem between 2 datapoins for the same metric is not know.
so the desired result is the <metric>.$current_value - <metric>.$previouse_value for each point in the metricstring.
Edit:
The metrics are stored in graphite/Carbon DB.
thanks
You need to use the derivative function
This is the opposite of the integral function. This is useful for taking a running total metric and calculating the delta between subsequent data points.
This function does not normalize for periods of time, as a true derivative would. Instead see the perSecond() function to calculate a rate of change over time.
Together with the keepLastValue
Takes one metric or a wildcard seriesList, and optionally a limit to the number of ‘None’ values to skip over.
Continues the line with the last received value when gaps (‘None’ values) appear in your data, rather than breaking your line.
Like this
derivative(keepLastValue(your_mteric))
A good example can be found here http://www.perehospital.cat/blog/graphite-getting-derivative-to-work-with-empty-data-points

How to create timeline chart with average using Kibana?

I am ingesting data to elasticsearch using flume, I want to create a time-series graph in kibana to show the events collected over time. BUT I also want to to the average per that time unit so the user knows if the current flow is around the average or not.
To create a timeline I am using line graph with #timestamp as X-axis and count as Y-axis.
The question is how to create the average line? and how to make this average dynamic e.g. as we zoom in average changes from average per day to average per hour.
While creating a visualization you can choose the type of y-axis metric. The default is "count". You can click on the icon to choose other type of metrics you want. It will have various options like average, sum, percentile etc.
As for the time range of average calculation, the the x-axis metrics, under buckets when you choose date histogram the default interval is auto.This means that the time range of average will chage automatically depending on overall time range selected.
You can change it to a fixed interval like per second, minute, hourly daily etc.
It's a bit odd, you would expect count to appear alongside field as something you can average. In reality you have to do it another way:
For the Y axis, instead of selecting count, select "Average Bucket"
then set up your bucket aggregation that you would like e.g. Date Histogram with second interval.
Below this you have another box for metric, e.g. the thing you're averaging, set this to count

Resources