# Get dimensions for a metric when metric has no data

**URL:** <https://community.dynatrace.com/t/get-dimensions-for-a-metric-when-metric-has-no-data/46850>\
**Category:** Extensions\
**Tags:** databases, oracle, extensions\
**Created:** [July 26, 2024, 7:14pm UTC](https://community.dynatrace.com/t/get-dimensions-for-a-metric-when-metric-has-no-data/46850 "2024-07-26T19:14:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [July 26, 2024, 7:14pm UTC](https://community.dynatrace.com/t/get-dimensions-for-a-metric-when-metric-has-no-data/46850/1 "2024-07-26T19:14:21Z")

</div>

I have an SQL Extension, where the metric has no data, which I am defaulting to 0 in my timeseries. But I also need the device (Instance Name) to pull it in the dashboard. For the scenario when there is no data in my metric, the other dimensions are also null. How can I get the correct value because the device always has value which is the DB instance.

My Timeseries below :

timeseries db\_invalid\_object = avg(`com.dynatrace.extension.sql-oracle.ally.db_invalid_object`, default: 0), by: { owner, device },nonEmpty: true  
| fieldsAdd db\_invalid\_object = arraySum(db\_invalid\_object)  
| sort db\_invalid\_object desc

---

_[View the full topic](https://community.dynatrace.com/t/get-dimensions-for-a-metric-when-metric-has-no-data/46850)._
