# How to Dynamically reference Pivot Index / index Value

**URL:** https://community.omni.co/t/how-to-dynamically-reference-pivot-index-index-value/272
**Category:** Workbooks
**Tags:** calcs, dashboards
**Created:** [March 18, 2025, 6:49pm UTC](https://community.omni.co/t/how-to-dynamically-reference-pivot-index-index-value/272 "2025-03-18T18:49:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SN1011](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@SN1011](https://community.omni.co/u/SN1011)
#### Post date: [March 18, 2025, 6:49pm UTC](https://community.omni.co/t/how-to-dynamically-reference-pivot-index-index-value/272/1 "2025-03-18T18:49:43Z")

</div>

I am using “=IF(PIVOTOFFSET(D1, 0, -1) \< 0, PIVOTINDEX(), NULL)” this formula to reference the corresponding pivot index value , but everytime index 1 is getting referenced.  
Is there anyway we can directly reference pivot index value or its index?

---

<div class="post-metadata">

### Author: ![James](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@James](https://community.omni.co/u/James)
#### Post date: [March 20, 2025, 9:56pm UTC](https://community.omni.co/t/how-to-dynamically-reference-pivot-index-index-value/272/2 "2025-03-20T21:56:41Z")

</div>

> [@SN1011](#):
>
> =IF(PIVOTOFFSET(D1, 0, -1) \< 0, PIVOTINDEX(), NULL)

Hi! This formula looks correct and should work as expected, I’m wondering if there are multiple pivots being used or something else impacting the formula in your workbook?

An example of what I’m seeing when replicating it. Are you looking to get the pivot value instead of the index?

 ![image](https://canada1.discourse-cdn.com/flex004/uploads/omni/original/1X/bc3451da19d8e60efcc99cafc2a6d023b1054ad0.png)
