# Percentage of revenue increase or decrease

**URL:** <https://connect.superhuman.com/t/percentage-of-revenue-increase-or-decrease/11707>\
**Category:** Ask the Community\
**Created:** [October 28, 2019, 9:56pm UTC](https://connect.superhuman.com/t/percentage-of-revenue-increase-or-decrease/11707 "2019-10-28T21:56:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Spellman](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jack_spellman/32/9607_2.png) [@Jack\_Spellman](https://connect.superhuman.com/u/Jack_Spellman)\
**Post date:** [October 28, 2019, 9:56pm UTC](https://connect.superhuman.com/t/percentage-of-revenue-increase-or-decrease/11707/1 "2019-10-28T21:56:42Z")

</div>

I’m trying to create a simple revenue report that breaks down revenue by year and month. I’d like to add a column that show the percentage the revenue increased or decreased from the previous year in the same month. I can’t figure out a formula to accomplish this. Any help is much appreciated! Here’s a [link to a copy of my doc](https://coda.io/d/Revenue-Report_d6COE1vJYlr/_suoQZ).

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [October 29, 2019, 12:48pm UTC](https://connect.superhuman.com/t/percentage-of-revenue-increase-or-decrease/11707/2 "2019-10-29T12:48:43Z")

</div>

Your doc is empty. But — if you need to get the value from another row (i.e. to compare this row’s value to that one), you can just use `Filter()`, and your formula will look like, e.g.:

`thisRow.Revenue / thisTable.Filter(Month = thisRow.Month AND Year = thisRow.Year - 1).Revenue`

If you’re storing month and year as a date, you can use `.RelativeDate(-12)` to get the date that’s 1 year ago, e.g.:

`thisRow.Revenue / thisTable.Filter([Start of month date] = thisRow.[Start of month date].RelativeDate(-12)).Revenue`

Best practice would be to separate this into two steps: first pull the row from 1 year ago into a separate column (e.g. named as “Compare to”), then in your percentage formula reference that column. It will also be more flexible then if you ever want to e.g. introduce a choice of what you want to compare to and make it more complex.

---

<div class="post-metadata">

**Author:** ![Jack\_Spellman](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jack_spellman/32/9607_2.png) [@Jack\_Spellman](https://connect.superhuman.com/u/Jack_Spellman)\
**Post date:** [November 18, 2019, 1:52pm UTC](https://connect.superhuman.com/t/percentage-of-revenue-increase-or-decrease/11707/3 "2019-11-18T13:52:41Z")

</div>

Sorry for the delayed response @Paul_Danyliuk. But you’re solution worked great. Thanks for your help!
