Reporting

Data Model: If I have a 2 columns in a pivot with numeric values, is it possible to create a 3rd column with a ratio of those values?

akawacz
Path Finder

Hi

In the pivot, I have two columns with numeric values. I would like to create third column with ratio of those two compute columns.

Is it possible? I do not want to add to the search in the data model because then I cannot use other attributes.

e.g
Column1/column2=column3

Data Column1 Column2 Column3
01-01-2015 100 200 0.5
02-02- 2015 200 100 2

krish3
Contributor

Add a calculated field using eval expression to your data model.

App-> pivot->choose datamodel-> Edit->disable acceleration(if enabled) -> Edit --> Add attribute --> Choose Eval ( enter below eval condition & Preview, submit)

eval Column3=Cloumn2/Column1

And also you can find more information for adding calculated fields here.

Calculated Fields
Defining calculated fields

0 Karma

akawacz
Path Finder

This will not work because Column 1 and Column2 are created in Pivot as Column Volume (they do not exist in the objects)
Basically they are aggregated values created in Pivot editor

0 Karma

krish3
Contributor

OK try to open the search and apply the eval on the search and you can save it as report/Dashboard.

AFAIK calculation on the pivot editor not possible, never tried let me check it out.

0 Karma

akawacz
Path Finder

in search I can not add this because calculated fields do not exist. They are computed in the Pivot

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...