# Data Explorer: How do I view the most recent Dimension value?

**URL:** <https://community.dynatrace.com/t/data-explorer-how-do-i-view-the-most-recent-dimension-value/48515>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, data-explorer, metric-events\
**Created:** [October 23, 2024, 8:46pm UTC](https://community.dynatrace.com/t/data-explorer-how-do-i-view-the-most-recent-dimension-value/48515 "2024-10-23T20:46:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASE](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@ASE](https://community.dynatrace.com/u/ASE)\
**Post date:** [October 23, 2024, 8:46pm UTC](https://community.dynatrace.com/t/data-explorer-how-do-i-view-the-most-recent-dimension-value/48515/1 "2024-10-23T20:46:34Z")

</div>

I have created a custom **Log Metric** using the **Occurrence of logs records** Metric measurement.

It contains 2 **Dimensions** that I plan to use to split and sort by.

When viewing my custom Log Metric in **Data Explorer** , is there a way to display only the most recent member\_uuid/eventtime record?

As you can see below, the same **member\_uuid** appears multiple times inside of the logs.

But as I create the **Metric Event** , all I really care about is the most recent log record entry.

 ![ASE_1-1729716297291.png](https://global.discourse-cdn.com/dynatrace/original/2X/c/ce52cc4894328c5c364dd98d5869eb85a878bbba.png)

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [October 24, 2024, 12:11am UTC](https://community.dynatrace.com/t/data-explorer-how-do-i-view-the-most-recent-dimension-value/48515/2 "2024-10-24T00:11:07Z")

</div>

Hey&nbsp;[@ASE](https://community.dynatrace.com/user/74836)

I’m not too sure if there is a way to achieve this without using DQL which you wouldn’t have access to if you are on Dynatrace Managed. You can use :lastreal in advanced mode but this takes the last real value of each instance of each dimension and since eventtime is a dimension it is going to evaluate it for each instance of eventtime too.

Also, using eventtime as a dimension could be problematic in the future if there are lots of these logs being ingested as there are limits on dimensions as mentioned in the docs [here](https://docs.dynatrace.com/docs/observe-and-explore/metrics/limits). I’d recommend keeping track of the dimension limits using the dsfm metric&nbsp;dsfm:server.metrics.custom\_dimensions\_usage. There are some other useful self monitoring metrics for this too.

---

<div class="post-metadata">

**Author:** ![ASE](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@ASE](https://community.dynatrace.com/u/ASE)\
**Post date:** [October 24, 2024, 4:51pm UTC](https://community.dynatrace.com/t/data-explorer-how-do-i-view-the-most-recent-dimension-value/48515/3 "2024-10-24T16:51:19Z")

</div>

Thank you for your response, [@Fin\_Ubels](https://community.dynatrace.com/user/47376).

We technically don’t have to use the eventtime **Dimension** in our **Metric Event** , as all we really care about is the presence of the **member\_uuid**.

I’m mainly using it to illustrate to you that the **member\_uuid** record shows up multiple times in the logs (and is sorted by eventime) and all we want to see is the most recent record.

You are correct. Using a DQL query works as expected. We can both sort and remove any duplicate member\_uuids.

However, when we create the custom **Log Metric** , we can’t use the full DQL. We are limited with what we can use in the **Matcher**.

We also don’t want to schedule and execute a full DQL query (using a Notebook or Dashboard) to retrieve these log records, as that is what creating a custom **Log Metric** is for.

The issue is that the log records themselves contain multiple records of the same **member\_uuid**.

Here’s a bit more context on what exactly we are trying to alert on.

We are planing to alert when the DQL query below returns any records. Value \> 0.

I decided to create 2 separate Log Metrics, as these are technically 2 separate DQL queries that are joined. Each query is for a different entity’s logs.

My thought is to use a Metric Expression in our **Metric Event**.

When Log Metric 1 + Log Metric 2 = 2, send us an alert.

We only care about a **member\_uuid** that appears in BOTH Log Metrics at the same time.

1 + 1 = 2

```markup
fetch logs
| filter dt.system.bucket == "bucket_name_1"
| filter dt.host_group.id == "host_group_id_name"
| parse content, "JSON:event"
| filter event[message] == "message_name"
| filter event[product_type] == "product_type_name"
| fieldsAdd member_uuid = event[member_uuid]
| join [	
fetch logs
| filter dt.system.bucket == "bucket_name_2"
| filter ecs_cluster == "ecs_cluster_name"
| filter matchesValue(requirement, "requirement_name")
| dedup member_uuid, sort: { timestamp desc }
], on: { member_uuid }
| filter right.requirement_status == "requirement_status_name"

```
