# Dynamic dymension won't enable using date column

**URL:** <https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110>\
**Category:** Q&A\
**Tags:** error, developer, quick-sight\
**Created:** [November 7, 2024, 10:20am UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110 "2024-11-07T10:20:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer1](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tomer1](https://community.amazonquick.com/u/tomer1)\
**Post date:** [November 7, 2024, 10:20am UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/1 "2024-11-07T10:20:31Z")

</div>

I made a calculated field that takes input of user’s choice of X-axis dimension that is saved into a parameter.  
This works for several columns, but when I’m adding another column which is Date column I get an error.

This works:  
ifelse(${dynamicX}=‘Source’, SOURCE, ${dynamicX}=‘DOS’, ACCOUNT, ${dynamicX}=‘Clinic’, CLINIC, ${dynamicX}=‘Account’, ACCOUNT ,SOURCE)

This doesn’t work:  
ifelse(${dynamicX}=‘DOS’,{DOS}, ${dynamicX}=‘Source’, SOURCE, ${dynamicX}=‘DOS’, ACCOUNT, ${dynamicX}=‘Clinic’, CLINIC, ${dynamicX}=‘Account’, ACCOUNT ,SOURCE).

The UX doesn’t imply where or what the syntax error is.  
Could you please help?

Thanks

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 7, 2024, 10:48pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/2 "2024-11-07T22:48:51Z")

</div>

Hi @tomer1 and welcome to the Quick Sight community!  
It looks like in your second calc. field, you have 2 instances where ${dynamicX}=‘DOS’. I wonder if that is leading to the syntax error?

---

<div class="post-metadata">

**Author:** ![tomer1](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tomer1](https://community.amazonquick.com/u/tomer1)\
**Post date:** [November 10, 2024, 12:50pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/3 "2024-11-10T12:50:25Z")

</div>

Yes you’re correct about this typo, I fixed it.  
Unfortunately I still get the syntax error specifically while adding this date-type column.

this worked:  
ifelse(${dynamicX}=‘Source’, SOURCE,  
${dynamicX}=‘Account’, ACCOUNT,  
${dynamicX}=‘Clinic’, CLINIC,  
${dynamicX}=‘Quarter’, Quarter,  
SOURCE)

Can this be solved?

---

<div class="post-metadata">

**Author:** ![tomer1](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tomer1](https://community.amazonquick.com/u/tomer1)\
**Post date:** [November 10, 2024, 12:58pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/4 "2024-11-10T12:58:43Z")

</div>

Also related - another angle of this:  
One of the options in the dropdown I’m talking about is DOS which hold dates.  
I wish to add different granularity options like month, quarter and year without having to make specific calculated field for each one of the option.  
I know date granularity is an option as I saw it one the demo central but I wish to extend this feature and to use it in this dynamic parameter dropdown.

@Brett Is this possible?

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 15, 2024, 8:53pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/5 "2024-11-15T20:53:29Z")

</div>

Hi @tomer1,  
You can’t return a different type of field so the error is coming from trying to return a date field. You could try using toString for the quarter portion but it may not return the date in the format you’re looking for.

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [November 27, 2024, 4:57pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/6 "2024-11-27T16:57:28Z")

</div>

Hi @tomer1,  
It’s been awhile since we last heard from you so following up to see if you had any additional questions?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [December 2, 2024, 7:38pm UTC](https://community.amazonquick.com/t/dynamic-dymension-wont-enable-using-date-column/38110/7 "2024-12-02T19:38:19Z")

</div>

Hi @tomer1,  
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!
