# Transforms - Latest and Pivot

**URL:** https://discuss.elastic.co/t/transforms-latest-and-pivot/353925
**Category:** Kibana
**Tags:** transforms
**Created:** [February 22, 2024, 8:57pm UTC](https://discuss.elastic.co/t/transforms-latest-and-pivot/353925 "2024-02-22T20:57:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)
#### Post date: [February 22, 2024, 8:57pm UTC](https://discuss.elastic.co/t/transforms-latest-and-pivot/353925/1 "2024-02-22T20:57:09Z")

</div>

Hello,

I was wondering if its possible to do something like a combination of latest and pivot or maybe more understanding of what I can do with each.

So use case:  
I have `status` field(keyword) reported for `object` field (keyword) into time series log ingestion. The problem is a status value of "up" might appear in the last 7 days, the status field won't reappear unless an event triggers and reports the value of "down". So I want to be able to show a static or updated index that can show the object, status, and the last value of the timestamp (the time the value was updated). Essentially an health overview of `object` values.

I did try this with latest, and it did keep the most latest value of `status`, its @timestamp was the last value of timestamp. This doesn't work for me because the overview of all objects and status varied depending on time range.

I want it to be static, so I used a pivot. The pivot did a great job at keeping a static index, but now I can't determine when the values were last updated.

I might be overthinking this, any help would be great!

---

<div class="post-metadata">

### Author: ![wei.wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wei.wang/32/51803_2.png) [@wei.wang](https://discuss.elastic.co/u/wei.wang)
#### Post date: [February 23, 2024, 3:28am UTC](https://discuss.elastic.co/t/transforms-latest-and-pivot/353925/2 "2024-02-23T03:28:47Z")

</div>

Hello,

> its possible to do something like a combination of latest and pivot

Unfortunately, no, you can only choose one type, either latest transform or pivot transform.

> So use case:  
> I have `status` field ...

It is a bit hard to understand your use case from the description. It will be more useful if you could post part of your source data (mask the sensitive information) , then tell what you want it to be transformed to.

> I want it to be static, so I used a pivot. The pivot did a great job at keeping a static index, but now I can't determine when the values were last updated.

Have you checked our [painless examples](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-painless-examples.html) for pivot transform? You might be able to find some similar case from there.

Thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 22, 2024, 3:29am UTC](https://discuss.elastic.co/t/transforms-latest-and-pivot/353925/3 "2024-03-22T03:29:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
