Dashboards & Visualizations

How to divide two single value panels and retrieve the value in the third single pannel?

Ragate
Explorer

I currently am building a dashboard and want to take two of my single value pannels results and divide them. I want this result to show in the third pannel. This is what I have:

<form>
  <label>Customer Stats. Clone</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="dropdown" token="account_drop" searchWhenChanged="true">
      <label>Account Name</label>
      <fieldForLabel>Account Name</fieldForLabel>
      <fieldForValue>Account Name</fieldForValue>
      <search>
        <query>source="LMCustomerRevLicense.csv" | dedup "Account Name" |</query>
        <earliest>0</earliest>
        <latest></latest>
      </search>
    </input>
    <input type="text" token="field1">
      <label>License Key</label>
      <default></default>
    </input>
  </fieldset>
  <row>
    <panel>
      <single>
        <title>License Key</title>
        <search>
          <query>source="LMCustomerRevLicense.csv" $account_drop$ | dedup "Account Name" | table "License Key Identifier"</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">none</option>
        <option name="height">116</option>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <title>Total Annual Revenue</title>
        <search>
          <query>source="LMCustomerRevLicense.csv" $account_drop$ | dedup "Account Name" | table "Total Active Subscription Revenue _converted"</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
    <panel>
      <single>
        <title>Documents Processed</title>
        <search>
          <query>source="c:\\users\\ragate\\desktop\\splunk\\jsondump.txt" OR source="LMCustomerRevLicense1.csv" $field1$ | eval "LicenseKeyID"=substr('context.custom.dimensions{}.LicenseKey' ,4,7) | eval LicenseKeyID= coalesce(LicenseKeyID, 'License Key Identifier') | table "LicenseKeyID" "Account Name" "context.custom.dimensions{}.DocumentSessionId" | stats distinct_count("context.custom.dimensions{}.DocumentSessionId")</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <title>Documents per $</title>
        <search>
          <query></query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <title>Distinct Users</title>
      <chart>
        <search>
          <query>host="ragate-lt1" $field1$ | chart count by context.user.anonId</query>
          <earliest>1529280000</earliest>
          <latest>1529539200</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">bar</option>
        <option name="refresh.display">progressbar</option>
      </chart>
    </panel>
    <panel>
      <title>Distinct Sessions</title>
      <chart>
        <search>
          <query>sourcetype="jsondump" $field1$ | top limit=20 "context.session.id"</query>
          <earliest>1529280000</earliest>
          <latest>1529539200</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </chart>
    </panel>
  </row>
</form>

I would like to divide the Total Annual Revenue by the Documents Processed and have this result show up in the Documents per $.
Anyone know how this could be done.
Thanks in advance.

0 Karma

niketn
Legend

@Ragate, refer to my previous answer for two approach to solve this issue of having two single value panels and use their values to show result in 3rd Single value.

https://answers.splunk.com/answers/613939/how-to-calculate-percentage-based-on-2-different-s.html

Please adjust to your need and confirm. If you need further assistance, kindly let us know!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...