# Rollup on a javascript column to do more than count and count unique

**URL:** <https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459>\
**Category:** Ask for Help\
**Created:** [February 25, 2023, 10:38am UTC](https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459 "2023-02-25T10:38:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pigeonflight](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pigeonflight/32/54611_2.png) [@pigeonflight](https://community.glideapps.com/u/pigeonflight)\
**Post date:** [February 25, 2023, 10:38am UTC](https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459/1 "2023-02-25T10:38:17Z")

</div>

I created a javascript column that returns a number. Interestingly I can’t do maximum, average etc… operations on a rollup of it. I was hoping to do a rollup that figures out the max value for the series.  
Is this a known limitation? Perhaps there’s a way to do this and I’m just missing something.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 25, 2023, 10:46am UTC](https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459/2 "2023-02-25T10:46:39Z")

</div>

The JavaScript column returns a string, so those additional rollup options aren’t available.  
However, you can convert the JavaScript output to a number using a math column (multiply it by 1), and then do your rollup on that column.

---

<div class="post-metadata">

**Author:** ![pigeonflight](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pigeonflight/32/54611_2.png) [@pigeonflight](https://community.glideapps.com/u/pigeonflight)\
**Post date:** [February 25, 2023, 11:56am UTC](https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459/3 "2023-02-25T11:56:53Z")

</div>

Yup… that did the trick

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 26, 2023, 11:57am UTC](https://community.glideapps.com/t/rollup-on-a-javascript-column-to-do-more-than-count-and-count-unique/58459/4 "2023-02-26T11:57:26Z")

</div>

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