# Dynamic column names not working - returns "All"

**URL:** <https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284>\
**Category:** Q&A\
**Tags:** quick-sight\
**Created:** [January 20, 2023, 9:10pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284 "2023-01-20T21:10:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://community.amazonquick.com/u/Steve1)\
**Post date:** [January 20, 2023, 9:10pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/1 "2023-01-20T21:10:19Z")

</div>

I’ve got a calculated field returning a string and have a parameter for it. In the value names it lets me use the parameter and it changes the column heading, but it gives me the value “All” which is not correct. I want it to return the value I placed in the string in the calculated field.

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [January 20, 2023, 9:13pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/2 "2023-01-20T21:13:44Z")

</div>

Are you changing the parameter?

It will only change when you change the parameter.

You can do that with a control. You cannot change the parameter with a calculated field.

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://community.amazonquick.com/u/Steve1)\
**Post date:** [January 20, 2023, 9:19pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/3 "2023-01-20T21:19:53Z")

</div>

I have the parameter pointed to a column of data with the value I want to display. All of the rows have the same value which kind of explains the All, but that is not what I want. My goal is have the column header by something like

Jan 2022  
Feb 20222

The dynamic date option doesn’t work, because it has to be based upon what data is in my system, not the system date.

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [January 20, 2023, 9:31pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/4 "2023-01-20T21:31:20Z")

</div>

I’m sorry, so you’re saying something like this won’t work because you don’t have all of the dates in your dataset?

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/1/1567a09dbc075764eeac5296b5d8123a7d07430b.png)

---

<div class="post-metadata">

**Author:** ![Steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Steve1](https://community.amazonquick.com/u/Steve1)\
**Post date:** [January 20, 2023, 10:58pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/5 "2023-01-20T22:58:08Z")

</div>

The date as a pivot column, as you suggest is a great idea that I tried. However, I get stuck on calculating the change from the prior month & percentage change from prior month.

– PriorMonth as calculated field  
sum(if else(dateDiff(MyPivotDate,AsOfDate,“MM”) = 1, 0) /\* comes up with zeros which is wrong \*/

– AsOfDate as calculated field  
maxOver(MyPivotDate, , PRE\_ARG)

---

<div class="post-metadata">

**Author:** ![Kellie\_Burton](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/kellie_burton/32/2603_2.png) [@Kellie\_Burton](https://community.amazonquick.com/u/Kellie_Burton)\
**Post date:** [January 24, 2023, 2:50pm UTC](https://community.amazonquick.com/t/dynamic-column-names-not-working-returns-all/9284/6 "2023-01-24T14:50:52Z")

</div>

Hi @Steve1!  
Here is an [article](https://community.amazonquick.com/t/period-over-period-and-other-date-comparison-calculations-yoy-mom-ytd-rolling-90-days-etc/564) on the Community that shows examples of how to calculate current period, previous period and percent difference.
