Forum Discussion
31415926
4 years agoNew Member
Year to Year only show specific values
Hi, I wanted to present the sales of 2021 and 2022 with YOY change %. YOY = DIVIDE(([Total Sales This Year]-[Total Sales Last Year]),[Total Sales Last Year]) As you can see below, the YOY val...
- 4 years ago
YOY % =
var currentSales = [Total Sales This Year]
var prevSales = [Total Sales Last Year]
return IF( currentSales > 0, DIVIDE( currentSales - prevSales, prevSales ) )will only return a value if there are sales for this year, otherwise it will return blank
johnt75
Super User
4 years agoYOY % =
var currentSales = [Total Sales This Year]
var prevSales = [Total Sales Last Year]
return IF( currentSales > 0, DIVIDE( currentSales - prevSales, prevSales ) )
will only return a value if there are sales for this year, otherwise it will return blank
31415926
4 years agoNew Member
Thanks a lot for your help!