Can I round aggregation metrics in OpenSearch/Kibana dashboard? - elasticsearch

I created a simple DataTable visualization in OpenSearch Dashboard (which is basically Kibana in AWS). I want table with average time per user. So I group by user, and use "Average" metric. It works great, but! the log has time in milliseconds, with 3 decimal places. Can I round it (or even truncate If necessary) these 3 decimal places?

One option is to go to Stack Management > Advanced Settings > Number format to set decimals (in general, not for an individual visualization):
Otherwise, you could create a Table using the Time Series Visual Builder (TSVB) editor where you have the possibility to set the decimals through Options tab > choose 'Custom' for the Data Formatter > set the desired 'Numeral.js' Format string:

Related

Format Number using Kibana Json Input

I am using Kibana KPI Visualization, and showing sum of values, but those values are in million and billions.
I checked Advanced Settings under which we can apply the number formatting but that will be applied throughout the space, I want to apply at specific KPI.
I got a link https://discuss.elastic.co/t/use-json-input-convert-bytes-to-gb/231330/2 using which I can divide the number, but I want the numeraljs format to be applied like 0.00a, so that it can format the number automatically.
{"script": " _value / 1000"}
this can give in thousands, but if this formatting can be done using numeraljs format it would be great.
Any help is much appreciated!

Can you remove drill through filter from measures in Power BI?

I am trying to use the drill through filter to take my user to other data related to that date. Essentially I have an overview page and I want the user to click on a date and drill through to the next page, where it will show them test scores nearest to that date.
I think I need to do two things 1) store the filter date as a variable so I can use it to find the nearest test date to the filtered date 2) create measures which ignore the filtered drill through date and can for example calculate the minimum or maximum test scores on all the tests overall.
I'm not sure if either of these options are possible but any help is greatly appreciated. TIA

Columnar report in Tableau

I'm new to Tableau. I'm using Tableau Desktop Professional 10.0.15. I need to write a very simple report that does not use any visualization.
Here's a example of the layout (the numbers are made up):
Web Site 1 North America Europe
Total Hits 3,523,483 3,523,483
Sessions 1,248,234 1,248,234
Unique Visitors 1,809,392 1,809,392
New Visitors 383,932 383,932
% new 10.9% 10.9%
Avg Page Views per user 1.9 1.9
Web Site 2 North America Europe
Total Hits 3,523,483 3,523,483
Sessions 1,248,234 1,248,234
Unique Visitors 1,809,392 1,809,392
New Visitors 383,932 383,932
% new 10.9% 10.9%
Avg Page Views per user 1.9 1.9
The users want the measures to be in one column, but they're not the same measures. Some measures need to be formatted as percentages. The average should have 1 decimal place. I have a feeling it's not possible to format the same measure differently in Tableau. Ideally, there would be something like a banded report where I could stack the measures on top of each other. But, I don't see a way to do that in Tableau. I could create a table in my database and put the measures in the same field and add the formatting in the database (which feels wrong), but it would have to be text (to have '%'). But, Tableau won't treat a text field as a measure. Also, it seems like if you don't add a measure, Tableau will insert a fake measure and put 'Abc' as the value (at least, I think that's why I'm getting these 'Abc' columns in my reports that I didn't add and that aren't in my data).
It seems like Tableau wants you to do something like this:
Unfortunately, this is not what my users want. Any suggestions?
In Tableau it's possible to put many measures in a single column using the measure names in rows.
To do this, add to filters shelf the dimension called Measures Names (the last one). Select all the Measures you'd like to show (Hits, Sessions, Visitors, Views, etc.). Then, drag this dimension to the rows shelft. Next, drag the measure called Measures Values (the last one too) to the marks shelf, specifically in the text box. You can also add other dimension to rows shelft (like website) to the left of Measures Names. This will show a table similar to your requirement.
By default, the Measure Values are SUM of each measure. Just right click on them and select the aggregation you need (AVG, COUNT or other).
Finally, you can format each measure as you want, right click a measure value, and select Format...

Spotfire data format from Oracle database

I am pulling data from an Oracle database into Spotfire. For some reason, Spotfire formats all numbers as currency with 2 decimals. In my data sets there are a significant number of columns that should be integers. Having them come in as currency doesn't cause any calculation issues that I've found, but it is a formatting issue when columns that obviously should not have decimals are displaced with them.
I have tried using the CAST AS SMALLINT, INTEGER, and also ROUND in my SQL statements to try and get rid of the decimal places. So far, they have all been unsuccessful.
Any ideas on how I can get Spotfire to import numbers with the desired format, or am I going to have to manually change them after they are imported?
Below is an example of some of the functions I have tried.
> SELECT
>
> NAME,
>
> CAST(X_ID AS SMALLINT) X_ID,
>
> CAST(Y_ID AS INTEGER) Y_ID,
>
> ROUND(Z_ID,0) AS Z_ID,
>
> FROM TABLE
Thanks
Spotfire is importing It to the largest most precise data type needed. If you want to display it differently then simply go to Edit > Column Properties, click on the column in question and change the format. You can also do this for each individual chart if you don’t want to make a global change

Grafana Templating

I am wondering if there is a way to limit the number of rows generated from grafana templating.
I can have a drop down variable "$x"on my grafana page and I can select the row editor and say repeat row for every value under $x.
Based on different criteria, I can have x anywhere between 1 and like 160 rows. I need to only be looking at about 10 at a time. I am wondering if I can control the number of rows shown/change the rows shown somewhere in grafana.
I can manually select items from the $x drop down to show only a few items of course, but its a matter of selecting only say.. 10 items right when the page loads.
Please let me know if I am not describing the problem correctly or if I need to clarify more.
Thanks,
Karan
As far as I know there is no direct option for this but there are some ways you may be able to achieve what you want.
You could select your ~10 default entries and then save the dashboard this will save the selected ones in the dashboards JSON. (or modify the JSON of the dashboard directly)
You could use the regex field in the template settings to filter some of your values and split them in groups this way. (one variable per regex group)
You could change your data in elasticsearch in order to use multiple fields where you can split on.
see PR #5616 as #Daniel Lee mentioned
In general I think you get a faster response to this in grafana directly at github.

Resources