Greater Than, Less Than, or Equal To previous month value
Hello,
I'm looking for help with the following formula to show trending information.
12 Months of Data (Jan - Dec), When each month gets updated, I would like to use a formula to show symbols for trending up, down, or unchanged compared to the previous month.
Does anyone know of a formula that can point me in the right direction?
Thank you.
Answers
-
Can you provide a screenshot of how your data is currently laid out?
-
-
So we want to pull from current_month...
INDEX(Jan@row:Dec@row, 1, MONTH(TODAY()))
And compare to previous_month...
INDEX(Jan@row:Dec@row, 1, MONTH(TODAY()) - 1)
and drop that comparison into a nested IF statement to show no change if equal, up if up, and down if down.
=IF(current_month = previous_month, "Unchanged", IF(current_month < previous_month, "Down", IF(current_month > previous_month, "Up")))
=IF(INDEX(Jan@row:Dec@row, 1, MONTH(TODAY())) = INDEX(Jan@row:Dec@row, 1, MONTH(TODAY()) - 1), "Unchanged", IF(INDEX(Jan@row:Dec@row, 1, MONTH(TODAY())) < INDEX(Jan@row:Dec@row, 1, MONTH(TODAY()) - 1), "Down", IF(INDEX(Jan@row:Dec@row, 1, MONTH(TODAY())) > INDEX(Jan@row:Dec@row, 1, MONTH(TODAY()) - 1), "Up")))
-
Thanks! This is great!
I pasted the formula and it's giving me the opposite results of what I want. I'll get a screenshot shortly to show you the results.
I understand the syntax, so I'm not sure what is going on.
-
You'll see that the first row is showing "down" but should be "Unchanged".
Second row should be "up", but is showing "down".
Not sure what is going on....
-
How exactly are the numbers being calculated?
-
Monthly Data Values are populated via Form Entry.
YTD is just an average of JAN:DEC
-
Ok. When a user enters the number into the form, are they just entering a number and the field is automatically converted to a percentage, or are they actually entering the % symbol? If they are manually entering the % symbol, then it is going to be stored as a text value instead of a numerical value.
-
They should be just entering a number, but I guess some of them could be adding the % symbol.
I have the values formatted in the source sheet.
-
Try running a test and updating some of those rows with unexpected results manually so that you are sure they are numerical values.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 443 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 129 Brandfolder
- 150 Just for fun
- 70 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!